]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: silence parentheses-equality warning
authorzenith432 <zenith432@users.sourceforge.net>
Sat, 9 Dec 2017 10:41:48 +0000 (10:41 +0000)
committerLiming Gao <liming.gao@intel.com>
Tue, 2 Jan 2018 12:37:32 +0000 (20:37 +0800)
Some code generated by antlr causes clang to emit warning
warning: equality comparison with extraneous parentheses
  [-Wparentheses-equality]
The warning is suppressed specifically for clang without affecting other
compilers.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zenith432 <zenith432@users.sourceforge.net>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c
BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.g
BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.c
BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.g

index d0185b8fb5b74c3894d282364e46196c5932c552..8088b3c25704fc307020fa6185c43458378b16c7 100644 (file)
@@ -41,6 +41,7 @@ ANTLR_INFO
 #pragma warn -aus  /* unused assignment of 'xxx' */\r
 #endif\r
 \r
+#pragma clang diagnostic ignored "-Wparentheses-equality"\r
 \r
 #ifdef __USE_PROTOS\r
 static void chkToken(char *, char *, char *, int);\r
index e6eda6010c63f3f942fd12af062589ca9c3147c4..e01728a1024f3ae05a9dc53cbcd2f1221f6de701 100644 (file)
@@ -53,6 +53,7 @@
 #pragma warn -aus  /* unused assignment of 'xxx' */\r
 #endif\r
 \r
+#pragma clang diagnostic ignored "-Wparentheses-equality"\r
 \r
 #ifdef __USE_PROTOS\r
 static void chkToken(char *, char *, char *, int);\r
index af07c27eeb4e64ce287401549b97993e67deda07..51f79759fbf3877801a065e99509daff30243b83 100644 (file)
@@ -39,6 +39,8 @@ Fix for Borland C++ 4.x & 5.x compiling with ALL warnings enabled
 #pragma warn -aus  /* unused assignment of 'xxx' */\r
 #endif\r
 \r
+#pragma clang diagnostic ignored "-Wparentheses-equality"\r
+\r
 int    action_no = 0;     /* keep track of actions outputted */\r
 int    nfa_allocated = 0; /* keeps track of number of nfa nodes */\r
 nfa_node **nfa_array = NULL;/* root of binary tree that stores nfa array */\r
index 58ca1106936ec38eaa16d62d9b5ac88bb108cf3c..0e3fe6d9d7f35e3c01cd0c242b3a80a9d55af5bb 100644 (file)
@@ -42,7 +42,9 @@
 #pragma warn -aus  /* unused assignment of 'xxx' */\r
 #endif\r
 \r
-int    action_no = 0;     /* keep track of actions outputed */\r
+#pragma clang diagnostic ignored "-Wparentheses-equality"\r
+\r
+int    action_no = 0;     /* keep track of actions outputted */\r
 int    nfa_allocated = 0; /* keeps track of number of nfa nodes */\r
 nfa_node **nfa_array = NULL;/* root of binary tree that stores nfa array */\r
 nfa_node nfa_model_node;   /* model to initialize new nodes */\r