Fix for pedantic warning with pre-processor in macro.

This commit is contained in:
David Garske
2021-08-17 14:55:42 -07:00
parent f5076cad1b
commit d1e027b6fa

View File

@@ -25893,26 +25893,25 @@ static void test_wc_PKCS7_EncodeDecodeEnvelopedData (void)
#endif #endif
tempWrd32 = pkcs7->privateKeySz; tempWrd32 = pkcs7->privateKeySz;
pkcs7->privateKeySz = 0; pkcs7->privateKeySz = 0;
AssertIntEQ(wc_PKCS7_DecodeEnvelopedData(pkcs7, output,
(word32)sizeof(output), decoded, (word32)sizeof(decoded)), i = wc_PKCS7_DecodeEnvelopedData(pkcs7, output,
#ifndef HAVE_AES_CBC (word32)sizeof(output), decoded, (word32)sizeof(decoded));
ASN_PARSE_E #ifndef HAVE_AES_CBC
#else AssertIntEQ(i, ASN_PARSE_E);
BAD_FUNC_ARG #else
#endif AssertIntEQ(i, BAD_FUNC_ARG);
); #endif
pkcs7->privateKeySz = tempWrd32; pkcs7->privateKeySz = tempWrd32;
tmpBytePtr = pkcs7->privateKey; tmpBytePtr = pkcs7->privateKey;
pkcs7->privateKey = NULL; pkcs7->privateKey = NULL;
AssertIntEQ(wc_PKCS7_DecodeEnvelopedData(pkcs7, output, i = wc_PKCS7_DecodeEnvelopedData(pkcs7, output,
(word32)sizeof(output), decoded, (word32)sizeof(decoded)), (word32)sizeof(output), decoded, (word32)sizeof(decoded));
#ifndef HAVE_AES_CBC #ifndef HAVE_AES_CBC
ASN_PARSE_E AssertIntEQ(i, ASN_PARSE_E);
#else #else
BAD_FUNC_ARG AssertIntEQ(i, BAD_FUNC_ARG);
#endif #endif
);
pkcs7->privateKey = tmpBytePtr; pkcs7->privateKey = tmpBytePtr;
wc_PKCS7_Free(pkcs7); wc_PKCS7_Free(pkcs7);