audk/CryptoPkg
Ard Biesheuvel c24d664dca CryptoPkg/OpensslLib AARCH64: disable rather than demote format warning
We recently added -Wno-error=format to the OpenSslLib build script to
work around an issue in the upstream OpenSSL code. This does not inhibit
the warning, but prevents it from breaking the build by not treating it
as a fatal error.

Unfortunately, this interacts poorly with the -Wno-unused-const-variable
option that we added to GCC49 and later. Those versions of GCC ignore
-Wno-xxxx options that they don't understand, unless warnings are emitted
for another reason, in which case the warning is emitted after all, and
in our case, this breaks the build when the non-fatal format warning is
emitted.

CryptoPkg/Library/OpensslLib/openssl/crypto/asn1/x_int64.c: In function 'uint64_print':
CryptoPkg/Library/OpensslLib/openssl/crypto/asn1/x_int64.c:105:32: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'int64_t {aka long long int}' [-Wformat=]
         return BIO_printf(out, "%"BIO_PRI64"d\n", **(int64_t **)pval);
                                ^
CryptoPkg/Library/OpensslLib/openssl/crypto/asn1/x_int64.c:106:28: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
     return BIO_printf(out, "%"BIO_PRI64"u\n", **(uint64_t **)pval);
                            ^
CryptoPkg/Library/OpensslLib/openssl/crypto/asn1/x_int64.c: At top level:
cc1: error: unrecognized command line option '-Wno-unused-const-variable' [-Werror]
cc1: all warnings being treated as errors

So replace -Wno-error=format with -Wno-format to suppress the warning
entirely.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Long Qin <qin.long@intel.com>
2017-12-27 10:00:19 +00:00
..
CryptRuntimeDxe CryptoPkg: Convert all .uni files to utf-8 2015-12-15 04:51:26 +00:00
Include CryptoPkg/TlsLib: Add some parameter check and clarification. 2017-12-22 15:50:37 +08:00
Library CryptoPkg/OpensslLib AARCH64: disable rather than demote format warning 2017-12-27 10:00:19 +00:00
.gitignore CryptoPkg: Update .gitignore for OpenSSL source masking 2017-03-29 16:05:42 +08:00
CryptoPkg.dec CryptoPkg: Update package version to 0.97 2017-05-05 11:29:22 +08:00
CryptoPkg.dsc CryptoPkg: Remove Cryptest Application from CryptoPkg 2017-12-27 02:32:13 +08:00
CryptoPkg.uni CryptoPkg: Convert all .uni files to utf-8 2015-12-15 04:51:26 +00:00
CryptoPkgExtra.uni CryptoPkg: Convert all .uni files to utf-8 2015-12-15 04:51:26 +00:00