mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 08:13:02 +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 "; /* "
|
#output "; /* "
|
||||||
*/
|
*/
|
||||||
enum { input_elts = sizeof input };
|
enum { input_elts = sizeof input };
|
||||||
|
(void) input_elts;
|
||||||
static ptrdiff_t toknum;
|
static ptrdiff_t toknum;
|
||||||
assert (0 <= toknum && toknum < input_elts);
|
assert (0 <= toknum && toknum < input_elts);
|
||||||
yylval = value_as_yystype (input[toknum]);
|
yylval = value_as_yystype (input[toknum]);
|
||||||
|
|||||||
@@ -559,6 +559,7 @@ static
|
|||||||
int res;
|
int res;
|
||||||
]AT_USE_LEX_ARGS[
|
]AT_USE_LEX_ARGS[
|
||||||
int input_elts = sizeof input / sizeof input[0];
|
int input_elts = sizeof input / sizeof input[0];
|
||||||
|
(void) input_elts;
|
||||||
assert (0 <= toknum && toknum < input_elts);
|
assert (0 <= toknum && toknum < input_elts);
|
||||||
res = input[toknum++];
|
res = input[toknum++];
|
||||||
]$2[;]AT_TOKEN_CTOR_IF([], [[
|
]$2[;]AT_TOKEN_CTOR_IF([], [[
|
||||||
|
|||||||
Reference in New Issue
Block a user