Ensure variables initialised

Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
Dave Rodgman 2023-04-13 14:59:03 +01:00
parent c07df36f9e
commit 9145dc46ed

View file

@ -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));