[edk2] [Patch] CryptoPkg/BaseCryptLib: Fix Build Warning issue in PEI Module

Qin Long posted 1 patch 7 years, 7 months ago
Failed in applying to current master (apply log)
CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
[edk2] [Patch] CryptoPkg/BaseCryptLib: Fix Build Warning issue in PEI Module
Posted by Qin Long 7 years, 7 months ago
The memory free operation is empty function in PEI. The compiler
optimization will bring the build warning in openssl/crypto/mem.c:
      warning C4718: 'CRYPTO_free': recursive call has no side
                     effects, deleting
This patch uses '/wd4718' to silence the build warning for PEI
module building.

Cc: Ting Ye <ting.ye@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
---
 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
index fdcd8b95f5..34e18971c8 100644
--- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
@@ -89,8 +89,9 @@
   #
   # suppress the following warnings so we do not break the build with warnings-as-errors:
   # C4090: 'function' : different 'const' qualifiers
+  # C4717: 'function call' : recursive call has no side effects, deleting
   #
-  MSFT:*_*_*_CC_FLAGS = /wd4090
+  MSFT:*_*_*_CC_FLAGS = /wd4090 /wd4718
 
   GCC:*_GCC44_IA32_CC_FLAGS = "-D__cdecl=__attribute__((cdecl))" "-D__declspec(t)=__attribute__((t))"
 
-- 
2.12.2.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] CryptoPkg/BaseCryptLib: Fix Build Warning issue in PEI Module
Posted by Dong, Eric 7 years, 7 months ago
Reviewed-by: Eric Dong <eric.dong@intel.com>

-----Original Message-----
From: Long, Qin 
Sent: Thursday, March 30, 2017 3:47 PM
To: Ye, Ting; Dong, Eric; Wu, Hao A; edk2-devel@lists.01.org
Subject: [Patch] CryptoPkg/BaseCryptLib: Fix Build Warning issue in PEI Module

The memory free operation is empty function in PEI. The compiler optimization will bring the build warning in openssl/crypto/mem.c:
      warning C4718: 'CRYPTO_free': recursive call has no side
                     effects, deleting
This patch uses '/wd4718' to silence the build warning for PEI module building.

Cc: Ting Ye <ting.ye@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
---
 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
index fdcd8b95f5..34e18971c8 100644
--- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
@@ -89,8 +89,9 @@
   #
   # suppress the following warnings so we do not break the build with warnings-as-errors:
   # C4090: 'function' : different 'const' qualifiers
+  # C4717: 'function call' : recursive call has no side effects, 
+ deleting
   #
-  MSFT:*_*_*_CC_FLAGS = /wd4090
+  MSFT:*_*_*_CC_FLAGS = /wd4090 /wd4718
 
   GCC:*_GCC44_IA32_CC_FLAGS = "-D__cdecl=__attribute__((cdecl))" "-D__declspec(t)=__attribute__((t))"
 
--
2.12.2.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [Patch] CryptoPkg/BaseCryptLib: Fix Build Warning issue in PEI Module
Posted by Ye, Ting 7 years, 7 months ago
Reviewed-by: Ye Ting <ting.ye@intel.com> 

-----Original Message-----
From: Long, Qin 
Sent: Thursday, March 30, 2017 3:47 PM
To: Ye, Ting <ting.ye@intel.com>; Dong, Eric <eric.dong@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; edk2-devel@lists.01.org
Subject: [Patch] CryptoPkg/BaseCryptLib: Fix Build Warning issue in PEI Module

The memory free operation is empty function in PEI. The compiler optimization will bring the build warning in openssl/crypto/mem.c:
      warning C4718: 'CRYPTO_free': recursive call has no side
                     effects, deleting
This patch uses '/wd4718' to silence the build warning for PEI module building.

Cc: Ting Ye <ting.ye@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
---
 CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
index fdcd8b95f5..34e18971c8 100644
--- a/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
+++ b/CryptoPkg/Library/BaseCryptLib/PeiCryptLib.inf
@@ -89,8 +89,9 @@
   #
   # suppress the following warnings so we do not break the build with warnings-as-errors:
   # C4090: 'function' : different 'const' qualifiers
+  # C4717: 'function call' : recursive call has no side effects, 
+ deleting
   #
-  MSFT:*_*_*_CC_FLAGS = /wd4090
+  MSFT:*_*_*_CC_FLAGS = /wd4090 /wd4718
 
   GCC:*_GCC44_IA32_CC_FLAGS = "-D__cdecl=__attribute__((cdecl))" "-D__declspec(t)=__attribute__((t))"
 
--
2.12.2.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel