From d1e027b6faf2ca9df222e089e6d70555cbdc9a95 Mon Sep 17 00:00:00 2001 From: David Garske Date: Tue, 17 Aug 2021 14:55:42 -0700 Subject: [PATCH] Fix for pedantic warning with pre-processor in macro. --- tests/api.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/tests/api.c b/tests/api.c index 837a68e94..7860e6e8d 100644 --- a/tests/api.c +++ b/tests/api.c @@ -25893,26 +25893,25 @@ static void test_wc_PKCS7_EncodeDecodeEnvelopedData (void) #endif tempWrd32 = pkcs7->privateKeySz; pkcs7->privateKeySz = 0; - AssertIntEQ(wc_PKCS7_DecodeEnvelopedData(pkcs7, output, - (word32)sizeof(output), decoded, (word32)sizeof(decoded)), - #ifndef HAVE_AES_CBC - ASN_PARSE_E - #else - BAD_FUNC_ARG - #endif - ); + + i = wc_PKCS7_DecodeEnvelopedData(pkcs7, output, + (word32)sizeof(output), decoded, (word32)sizeof(decoded)); +#ifndef HAVE_AES_CBC + AssertIntEQ(i, ASN_PARSE_E); +#else + AssertIntEQ(i, BAD_FUNC_ARG); +#endif pkcs7->privateKeySz = tempWrd32; tmpBytePtr = pkcs7->privateKey; pkcs7->privateKey = NULL; - AssertIntEQ(wc_PKCS7_DecodeEnvelopedData(pkcs7, output, - (word32)sizeof(output), decoded, (word32)sizeof(decoded)), - #ifndef HAVE_AES_CBC - ASN_PARSE_E - #else - BAD_FUNC_ARG - #endif - ); + i = wc_PKCS7_DecodeEnvelopedData(pkcs7, output, + (word32)sizeof(output), decoded, (word32)sizeof(decoded)); +#ifndef HAVE_AES_CBC + AssertIntEQ(i, ASN_PARSE_E); +#else + AssertIntEQ(i, BAD_FUNC_ARG); +#endif pkcs7->privateKey = tmpBytePtr; wc_PKCS7_Free(pkcs7);