From: Zenith432 <zenith432@users.sourceforge.net>
To: <edk2-devel@lists.01.org>
Subject: [PATCH 2/4] BaseTools: eliminate unused expression result in code
Date: Sat, 9 Dec 2017 14:42:50 +0000 (UTC) [thread overview]
Message-ID: <1051764655.1736978.1512830570107@mail.yahoo.com> (raw)
In-Reply-To: 1051764655.1736978.1512830570107.ref@mail.yahoo.com
Remove some code generated by antlr that causes clang to emit warning
warning: expression result unused [-Wunused-value]
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zenith432 <zenith432@users.sourceforge.net>
---
BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c | 2 +-
BaseTools/Source/C/VfrCompile/Pccts/antlr/gen.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c b/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c
index 8aaef794..d0185b8f 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c
@@ -3252,7 +3252,7 @@ enum_def(fname)
zzMake0;
{
if ( (LA(1)==ID)&&(isDLGmaxToken(LATEXT(1))) ) {
- if (!(isDLGmaxToken(LATEXT(1))) ) {zzfailed_pred(" isDLGmaxToken(LATEXT(1))",0 /* report */, { 0; /* no user action */ } );}
+ if (!(isDLGmaxToken(LATEXT(1))) ) {zzfailed_pred(" isDLGmaxToken(LATEXT(1))",0 /* report */, { ; /* no user action */ } );}
zzmatch(ID); zzCONSUME;
{
zzBLOCK(zztasp4);
diff --git a/BaseTools/Source/C/VfrCompile/Pccts/antlr/gen.c b/BaseTools/Source/C/VfrCompile/Pccts/antlr/gen.c
index d0a448d3..975558f0 100644
--- a/BaseTools/Source/C/VfrCompile/Pccts/antlr/gen.c
+++ b/BaseTools/Source/C/VfrCompile/Pccts/antlr/gen.c
@@ -1968,7 +1968,7 @@ ActionNode *p;
(p->pred_fail == NULL ? /* MR23/MR27 */
"0 /* report */" : "1 /* user action */"), /* MR23/MR27 */
(p->pred_fail == NULL ? /* MR23 */
- "0; /* no user action */" : p->pred_fail)); /* MR23 */
+ "; /* no user action */" : p->pred_fail)); /* MR23 */
tabs--;
}
else /* not a predicate */
@@ -2618,7 +2618,7 @@ TokNode *p;
(a->pred_fail == NULL ? /* MR23/MR27 */
"0 /* report */" : "1 /* user action */"), /* MR23/MR27 */
(a->pred_fail == NULL ? /* MR23 */
- "0; /* no user action */" : a->pred_fail)); /* MR23 */
+ "; /* no user action */" : a->pred_fail)); /* MR23 */
tabs--;
/* Disabled in MR30 ************************************************************
And moved into genAction
--
2.14.3 (Apple Git-98)
parent reply other threads:[~2017-12-09 14:38 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <1051764655.1736978.1512830570107.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=1051764655.1736978.1512830570107@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