From 93b745fa60c3f188eeaa93f120ad33d1469a648b Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Thu, 10 Dec 2015 07:15:53 +0000 Subject: CryptoPkg: fix AARCH64 build under CLANG35 The OpenSSL function sk_X509_delete_ptr() resolves through preprocessor substitution to '(X509 *)sk_delete_ptr()', in which the cast causes the call to be interpreted as an expression (whose value is not used) rather than a statement, resulting in the following error under Clang: ...: error: expression result unused [-Werror,-Wunused-value] Add (VOID) casts to silence the error. (Sync patch r18730 from main trunk.) Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Qin Long git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2015@19185 6f19259b-4bc3-4df7-8a09-765794883524 --- CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'CryptoPkg/Library') diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c index 6c91dea581..d49fbb7afd 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7Verify.c @@ -622,7 +622,7 @@ Pkcs7GetCertificatesList ( goto _Error; } } - sk_X509_delete_ptr (CertCtx.untrusted, Signer); + (VOID)sk_X509_delete_ptr (CertCtx.untrusted, Signer); // // Build certificates stack chained from Signer's certificate. @@ -652,7 +652,7 @@ Pkcs7GetCertificatesList ( if (!sk_X509_push (CertCtx.chain, Issuer)) { goto _Error; } - sk_X509_delete_ptr (CertCtx.untrusted, Issuer); + (VOID)sk_X509_delete_ptr (CertCtx.untrusted, Issuer); Cert = Issuer; continue; -- cgit v1.2.3