From a1a816ddc255344bceadb9cec2ac4055aa012522 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 20 Oct 1994 12:43:35 +0000 Subject: [PATCH] Avoid some empty if- and else- parts. gcc -Wall does not like it --- util/LLgen/lib/incl | 6 +++--- util/LLgen/lib/rec | 11 +++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/util/LLgen/lib/incl b/util/LLgen/lib/incl index 2c730a40e..f13bdc56b 100644 --- a/util/LLgen/lib/incl +++ b/util/LLgen/lib/incl @@ -10,11 +10,11 @@ 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[]; diff --git a/util/LLgen/lib/rec b/util/LLgen/lib/rec index cffa04433..d27740c41 100644 --- a/util/LLgen/lib/rec +++ b/util/LLgen/lib/rec @@ -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); -- 2.34.1