]> git.proxmox.com Git - mirror_edk2.git/commitdiff
CryptoPkg/OpensslLib AARCH64: suppress format string warning
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 27 Dec 2017 07:52:39 +0000 (07:52 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 27 Dec 2017 08:54:06 +0000 (08:54 +0000)
On GCC Build: openssl-1.1.0g introduced one additional build warning:
 ...\openssl\crypto\asn1\x_int64.c:105:32: error: format '%ld' expects
     argument of type 'long int', but argument 3 has type 'int64_t
     {aka long long int}' [-Werror=format=]
 return BIO_printf(out, "%"BIO_PRI64"d\n", **(int64_t **)pval);
                             ^
Add "-Wno-error=format" to GCC build flags to suppress this warning,
since we have no real printf usage in BaseCryptLib, and BIO_printf()
was already wrapped as a dummy implementation in CryptoPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Long Qin <qin.long@intel.com>
CryptoPkg/Library/OpensslLib/OpensslLib.inf
CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf

index 5302ad7fb5efcef8f67ad7d923144474197ee272..602953eefff7a889a54bf84b5a5e932d916444bd 100644 (file)
   GCC:*_*_X64_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -DNO_MSABI_VA_FUNCS\r
   GCC:*_*_IPF_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format\r
   GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS)\r
-  GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS)\r
+  GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=format\r
 \r
   # suppress the following warnings in openssl so we don't break the build with warnings-as-errors:\r
   # 1295: Deprecated declaration <entity> - give arg types\r
index 0c7f9e9e66f4004eb7ba87c8a5f6d3581ed54a0b..f697243f9787e6807d46a44557eecb9c21fe120f 100644 (file)
   GCC:*_*_X64_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format -DNO_MSABI_VA_FUNCS\r
   GCC:*_*_IPF_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) -Wno-error=maybe-uninitialized -Wno-error=format\r
   GCC:*_*_ARM_CC_FLAGS     = $(OPENSSL_FLAGS)\r
-  GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS)\r
+  GCC:*_*_AARCH64_CC_FLAGS = $(OPENSSL_FLAGS) -Wno-error=format\r
 \r
   # suppress the following warnings in openssl so we don't break the build with warnings-as-errors:\r
   # 1295: Deprecated declaration <entity> - give arg types\r