From 9145dc46ed98f0bc19e09d52486ba120c1f14589 Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Thu, 13 Apr 2023 14:59:03 +0100 Subject: [PATCH] Ensure variables initialised Signed-off-by: Dave Rodgman --- tests/suites/test_suite_alignment.function | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/suites/test_suite_alignment.function b/tests/suites/test_suite_alignment.function index 717c51a695..ed8f918d8c 100644 --- a/tests/suites/test_suite_alignment.function +++ b/tests/suites/test_suite_alignment.function @@ -12,7 +12,7 @@ */ int parse_hex_string(char *hex_string, uint64_t *result) { - uint8_t raw[8]; + uint8_t raw[8] = {0}; size_t olen; if (mbedtls_test_unhexify(raw, sizeof(raw), hex_string, &olen) != 0) { return 0; @@ -104,7 +104,7 @@ void mbedtls_unaligned_access(int size, int offset) /* BEGIN_CASE */ void mbedtls_byteswap(char *input_str, int size, char *expected_str) { - uint64_t input, expected; + uint64_t input = 0, expected = 0; TEST_ASSERT(parse_hex_string(input_str, &input)); TEST_ASSERT(parse_hex_string(expected_str, &expected));