From 80a183578b4c942656e67c37ce90bf413427982e Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Sat, 11 Dec 2004 06:07:11 +0000 Subject: [PATCH] (yyuserAction, yyrecoverSyntaxError): Mark args with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning. (yyparse): Remove unused local introduced in 2004-10-25 patch. --- data/glr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/data/glr.c b/data/glr.c index 0d1619f6..a6182755 100644 --- a/data/glr.c +++ b/data/glr.c @@ -704,7 +704,9 @@ yyfill (yyGLRStackItem *yyvsp, int *yylow, int yylow1, yybool yynormal) * yyerr for YYERROR, yyabort for YYABORT. */ static YYRESULTTAG yyuserAction (yyRuleNum yyn, int yyrhslen, yyGLRStackItem* yyvsp, - YYSTYPE* yyvalp, YYLTYPE* yylocp, yyGLRStack* yystack + YYSTYPE* yyvalp, + YYLTYPE* yylocp]b4_location_if(, [ ATTRIBUTE_UNUSED])[, + yyGLRStack* yystack ]b4_user_formals[) { yybool yynormal ATTRIBUTE_UNUSED = (yystack->yysplitPoint == NULL); @@ -1702,7 +1704,9 @@ yyreportSyntaxError (yyGLRStack* yystack, value, and location of the look-ahead. */ static void yyrecoverSyntaxError (yyGLRStack* yystack, - YYSTYPE* yylvalp, YYLTYPE* yyllocp]b4_user_formals[) + YYSTYPE* yylvalp, + YYLTYPE* yyllocp]b4_location_if(, [ ATTRIBUTE_UNUSED])[ + ]b4_user_formals[) { yySymbol* const yytokenp = yystack->yytokenp; size_t yyk; @@ -1923,7 +1927,6 @@ b4_syncline([@oline@], [@ofile@])])dnl } else if (yyisErrorAction (yyaction)) { - yyGLRState *yys = yystack.yytops.yystates[0]; ]b4_location_if([[ yystack.yyerror_range[0] = *yyllocp;]])[ yyreportSyntaxError (&yystack, yylvalp, yyllocp]b4_user_args[); goto yyuser_error; -- 2.45.2