diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2018-10-22 11:15:02 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2018-10-22 17:49:06 +0200 |
commit | b4b8666e4a9acc4470cfe0146af93ece9f711a34 (patch) | |
tree | 097ca48a023d427207fc88f7da3d56a61ba3cf43 /tests/cxx-type.at | |
parent | 0021bc3e28edcf1666bacc2c4eb9a0b30232856c (diff) | |
download | bison-b4b8666e4a9acc4470cfe0146af93ece9f711a34.tar.gz |
tests: be strict about types
* tests/actions.at, tests/c++.at, tests/cxx-type.at,
* tests/glr-regression.at, tests/local.at, tests/torture.at,
* tests/types.at:
Pay stricter attention to types to avoid warnings.
Diffstat (limited to 'tests/cxx-type.at')
-rw-r--r-- | tests/cxx-type.at | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/cxx-type.at b/tests/cxx-type.at index cf58cf85..f3af6f44 100644 --- a/tests/cxx-type.at +++ b/tests/cxx-type.at @@ -137,9 +137,6 @@ main (int argc, char **argv) ]AT_YYLEX_PROTOTYPE[ { - char buffer[256]; - int c; - unsigned i; static int lineNum = 1; static int colNum = 0; @@ -152,6 +149,7 @@ main (int argc, char **argv) while (1) { + int c; assert (!feof (stdin)); c = getchar (); switch (c) @@ -175,11 +173,12 @@ main (int argc, char **argv) yylloc.first_column = colNum;]])[ if (isalpha (c)) { - i = 0; + char buffer[256]; + unsigned i = 0; do { - buffer[i++] = c; + buffer[i++] = (char) c; colNum += 1; assert (i != sizeof buffer - 1); c = getchar (); |