From 410ca0ff94a42ee541dd6ceab70ea974eeb7e500 Mon Sep 17 00:00:00 2001 From: Gang Chen Date: Tue, 3 Jan 2023 13:57:38 +0800 Subject: [PATCH] CryptoPkg/Library: add -Wno-unused-but-set-variable for openssl The GCC warning fix is not in 1.1.1x. Ignore the warning type -Wno-unused-but-set-variable with GCC compiler in the build option. Cc: Jiewen Yao Cc: Jian J Wang Signed-off-by: Gang Chen Reviewed-by: Jiewen Yao --- CryptoPkg/Library/OpensslLib/OpensslLib.inf | 2 ++ CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf | 2 ++ CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 2 ++ CryptoPkg/Library/OpensslLib/OpensslLibFull.inf | 2 ++ CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf | 2 ++ 5 files changed, 10 insertions(+) diff --git a/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf index 1474df8125..86a00b1c4b 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf @@ -642,6 +642,8 @@ GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize + # Revisit after switching to 3.0 branch + GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: # 1295: Deprecated declaration - give arg types diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf index 3c5f6d5d17..2e4f95909b 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf @@ -690,6 +690,8 @@ GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize + # Revisit after switching to 3.0 branch + GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: # 1295: Deprecated declaration - give arg types diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf index a9adb94720..637d4769e8 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf @@ -592,6 +592,8 @@ GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize + # Revisit after switching to 3.0 branch + GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: # 1295: Deprecated declaration - give arg types diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf index 4c2cbe9cf7..c5f90221fc 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf @@ -697,6 +697,8 @@ GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize + # Revisit after switching to 3.0 branch + GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: # 1295: Deprecated declaration - give arg types diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf b/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf index 591c57fdc2..076295244a 100644 --- a/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf +++ b/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf @@ -745,6 +745,8 @@ GCC:*_CLANG35_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized GCC:*_CLANG38_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize + # Revisit after switching to 3.0 branch + GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: # 1295: Deprecated declaration - give arg types