]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools: eliminate unused expression result
authorzenith432 <zenith432@users.sourceforge.net>
Sat, 9 Dec 2017 10:14:41 +0000 (10:14 +0000)
committerLiming Gao <liming.gao@intel.com>
Tue, 2 Jan 2018 12:37:26 +0000 (20:37 +0800)
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>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/VfrCompile/Pccts/antlr/antlr.c
BaseTools/Source/C/VfrCompile/Pccts/antlr/gen.c

index 8aaef794e16e22293f8e6c717fc93f12e0952d81..d0185b8fb5b74c3894d282364e46196c5932c552 100644 (file)
@@ -3252,7 +3252,7 @@ enum_def(fname)
         zzMake0;\r
         {\r
         if ( (LA(1)==ID)&&(isDLGmaxToken(LATEXT(1))) ) {\r
-          if (!(isDLGmaxToken(LATEXT(1)))            ) {zzfailed_pred("  isDLGmaxToken(LATEXT(1))",0 /* report */, { 0; /* no user action */ } );}\r
+          if (!(isDLGmaxToken(LATEXT(1)))            ) {zzfailed_pred("  isDLGmaxToken(LATEXT(1))",0 /* report */, { ; /* no user action */ } );}\r
           zzmatch(ID); zzCONSUME;\r
           {\r
             zzBLOCK(zztasp4);\r
index d0a448d31d2e5a6635912ac506800590ca47cccc..975558f0dd07a718a0790387de1eea1e5504374f 100644 (file)
@@ -1968,7 +1968,7 @@ ActionNode *p;
                     (p->pred_fail == NULL ?                          /* MR23/MR27 */\r
                                "0 /* report */" : "1 /* user action */"),   /* MR23/MR27 */\r
                     (p->pred_fail == NULL ?                          /* MR23 */\r
-                        "0; /* no user action */" : p->pred_fail));  /* MR23 */\r
+                        "; /* no user action */" : p->pred_fail));   /* MR23 */\r
                        tabs--;\r
                }\r
                else    /* not a predicate */\r
@@ -2618,7 +2618,7 @@ TokNode *p;
                     (a->pred_fail == NULL ?                          /* MR23/MR27 */\r
                                "0 /* report */" : "1 /* user action */"),   /* MR23/MR27 */\r
                     (a->pred_fail == NULL ?                          /* MR23 */\r
-                        "0; /* no user action */" : a->pred_fail));  /* MR23 */\r
+                        "; /* no user action */" : a->pred_fail));   /* MR23 */\r
                        tabs--;\r
 /* Disabled in MR30 ************************************************************\r
    And moved into genAction\r