From 0693b66c44e3f211d0f394383029cf00c8a0d133 Mon Sep 17 00:00:00 2001 From: Hideki Miyazaki Date: Fri, 3 Mar 2023 17:51:34 +0900 Subject: [PATCH] fix init var in for-loop --- tests/api.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/api.c b/tests/api.c index aecd167d0..fea1e44c2 100644 --- a/tests/api.c +++ b/tests/api.c @@ -48353,6 +48353,7 @@ static int test_wc_ParseCert_Error(void) (!defined(HAVE_FIPS) || \ (defined(HAVE_FIPS_VERSION) && (HAVE_FIPS_VERSION > 2))) DecodedCert decodedCert; + int i; /* Certificate data */ const byte c0[] = { 0x30, 0x04, 0x30, 0x02, 0x02, 0x80, 0x00, 0x00}; @@ -48375,7 +48376,7 @@ static int test_wc_ParseCert_Error(void) }; const int tSz = (int)(sizeof(t) / sizeof(struct testStruct)); - for (int i = 0; i < tSz; i++) { + for (i = 0; i < tSz; i++) { WOLFSSL_MSG_EX("i == %d", i); wc_InitDecodedCert(&decodedCert, t[i].c, t[i].cSz, NULL); AssertIntEQ(wc_ParseCert(&decodedCert, CERT_TYPE, NO_VERIFY, NULL), t[i].expRet);