[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 5/5] yacc.c: scope reduction
From: |
Akim Demaille |
Subject: |
[PATCH 5/5] yacc.c: scope reduction |
Date: |
Wed, 12 Dec 2012 14:15:30 +0100 |
* data/yacc.c (yysyntax_error): here.
---
data/yacc.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/data/yacc.c b/data/yacc.c
index 810e2b2..b34549f 100644
--- a/data/yacc.c
+++ b/data/yacc.c
@@ -1247,7 +1247,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
{
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
- YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = YY_NULL;
@@ -1328,11 +1327,13 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
break;
}
yyarg[yycount++] = yytname[yyx];
- yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
- if (! (yysize <= yysize1
- && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ {
+ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL,
yytname[yyx]);
+ if (! (yysize <= yysize1
+ && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
}
}]b4_lac_if([[
# if ]b4_api_PREFIX[DEBUG
@@ -1356,10 +1357,12 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
# undef YYCASE_
}
- yysize1 = yysize + yystrlen (yyformat);
- if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
- return 2;
- yysize = yysize1;
+ {
+ YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
+ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
+ return 2;
+ yysize = yysize1;
+ }
if (*yymsg_alloc < yysize)
{
--
1.8.0.1
- [PATCH 0/5] {maint} restore C90 compliance, Akim Demaille, 2012/12/12
- [PATCH 1/5] gnulib: update, Akim Demaille, 2012/12/12
- [PATCH 5/5] yacc.c: scope reduction,
Akim Demaille <=
- [PATCH 4/5] tests: C90 compliance, Akim Demaille, 2012/12/12
- [PATCH 2/5] glr.c: scope reduction, Akim Demaille, 2012/12/12
- [PATCH 3/5] fix C90 compliance, Akim Demaille, 2012/12/12
- Re: [PATCH 0/5] {maint} restore C90 compliance, Paul Eggert, 2012/12/12