From: Akim Demaille Date: Fri, 28 Jun 2002 09:05:11 +0000 (+0000) Subject: * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for X-Git-Tag: BISON-1_49b~122 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/41442480750e455b137c491f001c23ef1574cf97 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for unused variables. * src/output.c (merger_output): static. --- diff --git a/ChangeLog b/ChangeLog index 6603bc49..400c18e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,10 +1,15 @@ +2002-06-28 Akim Demaille + + * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for + unused variables. + * src/output.c (merger_output): static. + 2002-06-28 Akim Demaille * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../. * src/conflicts.c (conflicts_total_count): `i' is unsigned, to pacify GCC. * src/output.c (save_row): Initialize all the variables to pacify GCC. - (merger_output): static. 2002-06-27 Paul Hilfinger diff --git a/data/yacc.c b/data/yacc.c index 3b885221..76f73fc7 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -1265,6 +1265,11 @@ static void yydestruct (int yytype, YYSTYPE yyvalue[]b4_location_if([, YYLTYPE yylocation])) { + /* Pacify ``unused variable'' warnings. */ + (void) yyvalue; +b4_location_if([ (void) yylocation; +])dnl + switch (yytype) { m4_map([b4_symbol_actions], m4_defn([b4_symbol_destructors]))dnl @@ -1283,6 +1288,11 @@ static void yysymprint (FILE* yyout, int yytype, YYSTYPE yyvalue[]b4_location_if([, YYLTYPE yylocation])) { + /* Pacify ``unused variable'' warnings. */ + (void) yyvalue; +b4_location_if([ (void) yylocation; +])dnl + if (yytype < YYNTOKENS) { YYFPRINTF (yyout, "token %s (", yytname[[yytype]]); diff --git a/src/output.c b/src/output.c index a15570a7..450297bf 100644 --- a/src/output.c +++ b/src/output.c @@ -660,7 +660,7 @@ actions_output (FILE *out) | Output the merge functions to OUT. | `--------------------------------------*/ -void +static void merger_output (FILE *out) { int n; diff --git a/src/parse-gram.c b/src/parse-gram.c index ed1685b8..fb695f64 100644 --- a/src/parse-gram.c +++ b/src/parse-gram.c @@ -236,7 +236,7 @@ typedef union { char *string; associativity assoc; } yystype; -/* Line 272 of /home/cs/hilfingr/work/grammars/glr2/install/share/bison/yacc.c. */ +/* Line 272 of /home/lrde/prof/akim/src/bison/data/yacc.c. */ #line 241 "parse-gram.c" # define YYSTYPE yystype # define YYSTYPE_IS_TRIVIAL 1 @@ -257,7 +257,7 @@ typedef struct yyltype /* Copy the second part of user declarations. */ -/* Line 292 of /home/cs/hilfingr/work/grammars/glr2/install/share/bison/yacc.c. */ +/* Line 292 of /home/lrde/prof/akim/src/bison/data/yacc.c. */ #line 262 "parse-gram.c" #if ! defined (yyoverflow) || YYERROR_VERBOSE @@ -1520,7 +1520,7 @@ yyreduce: } -/* Line 1040 of /home/cs/hilfingr/work/grammars/glr2/install/share/bison/yacc.c. */ +/* Line 1040 of /home/lrde/prof/akim/src/bison/data/yacc.c. */ #line 1525 "parse-gram.c" yyvsp -= yylen; @@ -1748,6 +1748,10 @@ static void yydestruct (int yytype, YYSTYPE yyvalue, YYLTYPE yylocation) { + /* Pacify ``unused variable'' warnings. */ + (void) yyvalue; + (void) yylocation; + switch (yytype) { default: @@ -1765,6 +1769,10 @@ static void yysymprint (FILE* yyout, int yytype, YYSTYPE yyvalue, YYLTYPE yylocation) { + /* Pacify ``unused variable'' warnings. */ + (void) yyvalue; + (void) yylocation; + if (yytype < YYNTOKENS) { YYFPRINTF (yyout, "token %s (", yytname[yytype]); diff --git a/src/parse-gram.h b/src/parse-gram.h index 54b27f8a..57314fcf 100644 --- a/src/parse-gram.h +++ b/src/parse-gram.h @@ -111,7 +111,7 @@ typedef union { char *string; associativity assoc; } yystype; -/* Line 1343 of /home/cs/hilfingr/work/grammars/glr2/install/share/bison/yacc.c. */ +/* Line 1353 of /home/lrde/prof/akim/src/bison/data/yacc.c. */ #line 116 "y.tab.h" # define YYSTYPE yystype #endif