summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2012-12-12 11:28:24 +0100
committerAkim Demaille <akim@lrde.epita.fr>2012-12-12 11:28:24 +0100
commitfc28638e1c4ef0c41ad52b832b547305ea8c1784 (patch)
treef63485b63b6827a0429c532cec97227e9e008c69
parent911537c30f91d1104775dd61d409039252a0ce75 (diff)
downloadbison-fc28638e1c4ef0c41ad52b832b547305ea8c1784.tar.gz
glr.c: scope reduction
* data/glr.c (yyreportSyntaxError): Reduce the scope of yysize1 (now yysz).
-rw-r--r--data/glr.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/data/glr.c b/data/glr.c
index cdefd507..e55a2df3 100644
--- a/data/glr.c
+++ b/data/glr.c
@@ -2016,7 +2016,6 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
yySymbol yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
size_t yysize0 = yytnamerr (YY_NULL, yytokenName (yytoken));
size_t yysize = yysize0;
- size_t yysize1;
yybool yysize_overflow = yyfalse;
char* yymsg = YY_NULL;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
@@ -2076,9 +2075,11 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
break;
}
yyarg[yycount++] = yytokenName (yyx);
- yysize1 = yysize + yytnamerr (YY_NULL, yytokenName (yyx));
- yysize_overflow |= yysize1 < yysize;
- yysize = yysize1;
+ {
+ size_t yysz = yysize + yytnamerr (YY_NULL, yytokenName (yyx));
+ yysize_overflow |= yysz < yysize;
+ yysize = yysz;
+ }
}
}
}
@@ -2098,9 +2099,11 @@ yyreportSyntaxError (yyGLRStack* yystackp]b4_user_formals[)
#undef YYCASE_
}
- yysize1 = yysize + strlen (yyformat);
- yysize_overflow |= yysize1 < yysize;
- yysize = yysize1;
+ {
+ size_t yysz = yysize + strlen (yyformat);
+ yysize_overflow |= yysz < yysize;
+ yysize = yysz;
+ }
if (!yysize_overflow)
yymsg = (char *) YYMALLOC (yysize);