summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAkim Demaille <akim.demaille@gmail.com>2019-10-05 17:28:51 +0200
committerAkim Demaille <akim.demaille@gmail.com>2019-10-05 23:00:05 +0200
commit4246cd81df3101b1abef3f5914f6b3fa7d1b44de (patch)
treee8b951a58ac4bd4621f42be1a5f96e2987681af8 /tests
parente69b47cd189d7eb45668acce4cf17815401bf2a5 (diff)
downloadbison-4246cd81df3101b1abef3f5914f6b3fa7d1b44de.tar.gz
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!).
Diffstat (limited to 'tests')
-rw-r--r--tests/local.at2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/local.at b/tests/local.at
index 17759b2f..579b85c3 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -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++];