From f47cdfcaede16136710c2fa854af36ac3d7aa1f9 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Wed, 2 Dec 2020 13:31:23 -0600 Subject: [PATCH] wolfcrypt/test/test.c: fix skipped initialization warned by LLVM11 scan-build. --- wolfcrypt/test/test.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 24999041a..2a81af751 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -15648,12 +15648,14 @@ static int dsa_test(void) XMEMCPY(tmp, dsa_key_der_2048, sizeof_dsa_key_der_2048); bytes = sizeof_dsa_key_der_2048; #else - XFILE file = XFOPEN(dsaKey, "rb"); - if (!file) - ERROR_OUT(-8200, out); + { + XFILE file = XFOPEN(dsaKey, "rb"); + if (!file) + ERROR_OUT(-8200, out); - bytes = (word32) XFREAD(tmp, 1, DSA_TEST_TMP_SIZE, file); - XFCLOSE(file); + bytes = (word32) XFREAD(tmp, 1, DSA_TEST_TMP_SIZE, file); + XFCLOSE(file); + } #endif /* USE_CERT_BUFFERS */ ret = wc_InitSha_ex(&sha, HEAP_HINT, devId);