The option -Wno-error=unused-but-set-variable is added to disable variable
'fp' set but not used in GCC. But, XCODE doesn't know this option. To make
XCODE pass build, -Wno-error=unknown-warning-option is added.

The warning unused-but-set-variable reports the code issue. It will report
to Oniguruma project. After it is fixed, next version code can remove
those options.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <[email protected]>
---
 MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf | 3 +++
 1 file changed, 3 insertions(+)

diff --git 
a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf 
b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf
index 18e4d2f..b30d6cf 100644
--- a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf
+++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf
@@ -112,3 +112,6 @@
   
   # Enable STDARG for variable arguments
   *_*_*_CC_FLAGS = -DHAVE_STDARG_H
+
+  # Disable unknown warning option '-Werror=unused-but-set-variable'
+  XCODE:*_*_*_CC_FLAGS = -Wno-error=unknown-warning-option
-- 
2.10.0.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to