Avoid some empty if- and else- parts. gcc -Wall does not like it
authorceriel <none@none>
Thu, 20 Oct 1994 12:43:35 +0000 (12:43 +0000)
committerceriel <none@none>
Thu, 20 Oct 1994 12:43:35 +0000 (12:43 +0000)
util/LLgen/lib/incl
util/LLgen/lib/rec

index 2c730a4..f13bdc5 100644 (file)
 extern int LLsymb;
 
 #define LL_SAFE(x)     /* Nothing */
-#define LL_SSCANDONE(x)        if (LLsymb != x) LLsafeerror(x); else
-#define LL_SCANDONE(x) if (LLsymb != x) LLerror(x); else
+#define LL_SSCANDONE(x)        if (LLsymb != x) LLsafeerror(x)
+#define LL_SCANDONE(x) if (LLsymb != x) LLerror(x)
 #define LL_NOSCANDONE(x) LLscan(x)
 #ifdef LL_FASTER
-#define LLscan(x)      if ((LLsymb = LL_LEXI()) != x) LLerror(x); else
+#define LLscan(x)      if ((LLsymb = LL_LEXI()) != x) LLerror(x)
 #endif
 
 extern unsigned int LLscnt[];
index cffa044..d27740c 100644 (file)
@@ -13,7 +13,10 @@ int          LLcsymb, LLsymb;
 static int     LLlevel;
 
 #if LL_ANSI_C
+#define LL_VOIDCST (void)
 void   LLmessage(int);
+#else
+#define LL_VOIDCST
 #endif
 #ifdef LL_USERHOOK
 #if LL_ANSI_C
@@ -72,7 +75,7 @@ LLerror(t)
        if (t == EOFILE) {
 #ifdef LL_USERHOOK
                static int lst[] = { EOFILE, 0 };
-               if (LLuserhook(EOFILE, lst)) /* nothing */;
+               LL_VOIDCST LLuserhook(EOFILE, lst);
 #endif /* LL_USERHOOK */
                if (LLsymb != EOFILE && LLsymb > 0) {
                        LLmessage(-1);
@@ -89,9 +92,9 @@ LLerror(t)
        i = LLindex[t];
        LLtcnt[i]++;
 #ifdef LL_USERHOOK
-       if (LLdoskip(t)) /* nothing */;
+       LL_VOIDCST LLdoskip(t);
 #else
-       if (LLskip()) /* nothing */;
+       LL_VOIDCST LLskip();
 #endif
        LLtcnt[i]--;
        if (LLsymb != t) LLmessage(t);
@@ -109,7 +112,7 @@ LLsafeerror(t)
        if (t == EOFILE) {
 #ifdef LL_USERHOOK
                static int lst[] = { EOFILE, 0 };
-               if (LLuserhook(EOFILE, lst)) /* nothing */;
+               LL_VOIDCST LLuserhook(EOFILE, lst);
 #endif /* LL_USERHOOK */
                if (LLsymb != EOFILE && LLsymb > 0) {
                        LLmessage(-1);