mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
tests: be robust to -DNDEBUG
input.y: In function 'yylex':
input.y:67:7: error: unused variable 'input_elts' [-Werror=unused-variable]
int input_elts = sizeof input / sizeof input[0];
^~~~~~~~~~
cc1: all warnings being treated as errors
* tests/input.at, tests/local.at: Avoid that.
This commit is contained in:
@@ -1321,6 +1321,7 @@ yylex (void)
|
||||
#output "; /* "
|
||||
*/
|
||||
enum { input_elts = sizeof input };
|
||||
(void) input_elts;
|
||||
static ptrdiff_t toknum;
|
||||
assert (0 <= toknum && toknum < input_elts);
|
||||
yylval = value_as_yystype (input[toknum]);
|
||||
|
||||
@@ -559,6 +559,7 @@ static
|
||||
int res;
|
||||
]AT_USE_LEX_ARGS[
|
||||
int input_elts = sizeof input / sizeof input[0];
|
||||
(void) input_elts;
|
||||
assert (0 <= toknum && toknum < input_elts);
|
||||
res = input[toknum++];
|
||||
]$2[;]AT_TOKEN_CTOR_IF([], [[
|
||||
|
||||
Reference in New Issue
Block a user