BaseTools: silence parentheses-equality warning

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>
This commit is contained in:
zenith432 2017-12-09 10:41:48 +00:00 committed by Liming Gao
parent a5b84d3480
commit 4e97974c1e
4 changed files with 7 additions and 1 deletions

View File

@ -41,6 +41,7 @@ ANTLR_INFO
#pragma warn -aus /* unused assignment of 'xxx' */
#endif
#pragma clang diagnostic ignored "-Wparentheses-equality"
#ifdef __USE_PROTOS
static void chkToken(char *, char *, char *, int);

View File

@ -53,6 +53,7 @@
#pragma warn -aus /* unused assignment of 'xxx' */
#endif
#pragma clang diagnostic ignored "-Wparentheses-equality"
#ifdef __USE_PROTOS
static void chkToken(char *, char *, char *, int);

View 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' */
#endif
#pragma clang diagnostic ignored "-Wparentheses-equality"
int action_no = 0; /* keep track of actions outputted */
int nfa_allocated = 0; /* keeps track of number of nfa nodes */
nfa_node **nfa_array = NULL;/* root of binary tree that stores nfa array */

View File

@ -42,7 +42,9 @@
#pragma warn -aus /* unused assignment of 'xxx' */
#endif
int action_no = 0; /* keep track of actions outputed */
#pragma clang diagnostic ignored "-Wparentheses-equality"
int action_no = 0; /* keep track of actions outputted */
int nfa_allocated = 0; /* keeps track of number of nfa nodes */
nfa_node **nfa_array = NULL;/* root of binary tree that stores nfa array */
nfa_node nfa_model_node; /* model to initialize new nodes */