* data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):

Use assignments rather than casts-to-void to suppress
unused-variable warnings.  This pacifies 'lint'.
* data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
unused-variable warnings.
This commit is contained in:
Paul Eggert
2005-10-05 06:05:22 +00:00
parent f8333ce5fd
commit 88c6637fa9
3 changed files with 24 additions and 17 deletions

View File

@@ -411,12 +411,12 @@ void
yy::]b4_parser_class_name[::yysymprint_ (int yytype,
const semantic_type* yyvaluep, const location_type* yylocationp)
{
/* Pacify ``unused variable'' warnings. */
(void) yyvaluep;
(void) yylocationp;
/* Backward compatibility, but should be removed eventually. */
std::ostream& cdebug_ = *yycdebug_;
(void) cdebug_;
/* Suppress unused-variable warnings. */
if (false)
yysymprint_ (yytype + !&cdebug_, yyvaluep, yylocationp);
*yycdebug_ << (yytype < yyntokens_ ? "token" : "nterm")
<< ' ' << yytname_[yytype] << " ("
@@ -435,10 +435,9 @@ void
yy::]b4_parser_class_name[::yydestruct_ (const char* yymsg,
int yytype, semantic_type* yyvaluep, location_type* yylocationp)
{
/* Pacify ``unused variable'' warnings. */
(void) yymsg;
(void) yyvaluep;
(void) yylocationp;
/* Suppress unused-variable warnings. */
if (false)
yydestruct_ (yymsg, yytype, yyvaluep, yylocationp);
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);