From bc56d4b09a281ac46443c9931ae20e9298753da5 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Fri, 29 Jan 2021 17:00:50 -0500 Subject: Use int when checking for EOF --- bin/bit.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/bit.y b/bin/bit.y index 9d977a34..1119bce6 100644 --- a/bin/bit.y +++ b/bin/bit.y @@ -88,7 +88,7 @@ expr: static int lexInt(uint64_t base) { yylval = 0; - for (char ch; EOF != (ch = getchar());) { + for (int ch; EOF != (ch = getchar());) { uint64_t digit = base; if (ch == '_') { continue; @@ -108,7 +108,7 @@ static int lexInt(uint64_t base) { } static int yylex(void) { - char ch; + int ch; while (isblank(ch = getchar())); if (ch == '\'') { yylval = 0; -- cgit 1.4.1