mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
tests: avoid a GCC 4.8 warning
GCC 4.8 reports:
input.y:57:33: error: conversion to 'int' from 'long unsigned int'
may alter its value [-Werror=conversion]
int input_elts = sizeof input / sizeof input[0];
^
* tests/local.at (AT_YYLEX_DEFINE(c)): Add a cast (sorry, Paul!).
This commit is contained in:
@@ -558,7 +558,7 @@ static
|
||||
static int toknum = 0;
|
||||
int res;
|
||||
]AT_USE_LEX_ARGS[
|
||||
int input_elts = sizeof input / sizeof input[0];
|
||||
int input_elts = (int) (sizeof input / sizeof input[0]);
|
||||
(void) input_elts;
|
||||
assert (0 <= toknum && toknum < input_elts);
|
||||
res = input[toknum++];
|
||||
|
||||
Reference in New Issue
Block a user