From a34c5b018f55b64d812bc04fc3cba1c458104e5c Mon Sep 17 00:00:00 2001 From: TakayukiMatsuo Date: Mon, 1 Mar 2021 00:49:50 +0900 Subject: [PATCH] Move the local variable declaration to the beginning of the function --- wolfcrypt/src/evp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/src/evp.c b/wolfcrypt/src/evp.c index 3a2b2a45a..597d7ac7e 100644 --- a/wolfcrypt/src/evp.c +++ b/wolfcrypt/src/evp.c @@ -7208,7 +7208,7 @@ static int PrintPubKeyEC(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, static int PrintPubKeyDSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, int indent, int bitlen, ASN1_PCTX* pctx) { - (void)pctx; + int length; int res; byte buff[128] = { 0 }; @@ -7221,6 +7221,7 @@ static int PrintPubKeyDSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, int wsz = 0; inOutIdx = 0; + (void)pctx; if (GetSequence(pkey, &inOutIdx, &length, pkeySz) < 0) return WOLFSSL_FAILURE; if (GetSequence(pkey, &inOutIdx, &length, pkeySz) < 0) @@ -7374,7 +7375,7 @@ static int PrintPubKeyDSA(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, static int PrintPubKeyDH(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, int indent, int bitlen, ASN1_PCTX* pctx) { - (void)pctx; + word32 length; byte buff[128] = { 0 }; word32 inOutIdx = 0; @@ -7389,6 +7390,7 @@ static int PrintPubKeyDH(WOLFSSL_BIO* out, const byte* pkey, int pkeySz, int wsz = 0; inOutIdx = 0; + (void)pctx; if (GetSequence(pkey, &inOutIdx, (int*)&length, pkeySz) < 0) return WOLFSSL_FAILURE; if (GetSequence(pkey, &inOutIdx, (int*)&length, pkeySz) < 0)