From: Zenith432 <zenith432@users.sourceforge.net>
To: <edk2-devel@lists.01.org>
Subject: [PATCH 3/4][Repost] BaseTools: silence equality comparison with extraneous parentheses warning in code generated by antlr
Date: Sat, 9 Dec 2017 14:51:20 +0000 (UTC) [thread overview]
Message-ID: <1562401802.1737396.1512831080690@mail.yahoo.com> (raw)
In-Reply-To: 1562401802.1737396.1512831080690.ref@mail.yahoo.com
This is a repost, subject truncated in previous send.
---
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>
---
BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c | 1 +
BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.g | 1 +
BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.c | 2 ++
BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.g | 4 +++-
4 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c b/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c
index d0185b8f..8088b3c2 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c
@@ -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);
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.g b/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.g
index e6eda601..e01728a1 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.g
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.g
@@ -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);
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.c b/BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.c
index af07c27e..51f79759 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.c
+++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.c
@@ -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 */
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.g b/BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.g
index 58ca1106..0e3fe6d9 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.g
+++ b/BaseTools/Source/C/VfrCompile/Pccts/dlg/dlg_p.g
@@ -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 */
--
2.14.3 (Apple Git-98)
parent reply other threads:[~2017-12-09 14:46 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1562401802.1737396.1512831080690.ref@mail.yahoo.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1562401802.1737396.1512831080690@mail.yahoo.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox