From 32f4c0a1b29ed97f82ed3c41156ac6ca856a60f2 Mon Sep 17 00:00:00 2001 From: Theophile Ranquet Date: Tue, 15 Jan 2013 18:03:39 +0100 Subject: [PATCH] tests: better silencing of unused argument warnings input.yy:35:44: error: unused parameter 'msg' [-Werror,-Wunused-parameter] void yy::parser::error (std::string const& msg) ^ * tests/c++.at (C++ GLR parser identifier shadowing): Don't name unused argument, use YYUSE instead of a direct cast to void. --- tests/c++.at | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/c++.at b/tests/c++.at index ad08b8ad..0bebe8a5 100644 --- a/tests/c++.at +++ b/tests/c++.at @@ -781,14 +781,15 @@ exp: ZERO int yylex (yy::parser::semantic_type *yylval) { - (void) *yylval; + // Note: this argument is unused, but named on purpose. There used to be a + // bug with a macro that erroneously expanded this identifier to + // yystackp->yyval. + YYUSE (yylval); return yy::parser::token::ZERO; } -void yy::parser::error (std::string const& msg) -{ - (void) msg; -} +void yy::parser::error (std::string const&) +{} int main() {} -- 2.47.2