summaryrefslogtreecommitdiff
path: root/src/gen.c
diff options
context:
space:
mode:
authorrlar <rlar>2016-02-28 15:20:31 +0100
committerWill Estes <westes575@gmail.com>2016-03-12 14:25:34 -0500
commit3946924ed5e77420c453bf841603c7278766093a (patch)
tree0590d42f392562e7f627455c5e7933d328357912 /src/gen.c
parent986bb5e29492a927a2ad157505c900f75c97016a (diff)
generated code, `max_size' seems to be of type `int', fix casts accordingly
Diffstat (limited to 'src/gen.c')
-rw-r--r--src/gen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gen.c b/src/gen.c
index 21b27ae..d31aab3 100644
--- a/src/gen.c
+++ b/src/gen.c
@@ -1875,7 +1875,7 @@ void make_tables (void)
if (!C_plus_plus) {
if (use_read) {
outn ("\terrno=0; \\");
- outn ("\twhile ( (result = (int) read( fileno(yyin), buf, max_size )) < 0 ) \\");
+ outn ("\twhile ( (result = (int) read( fileno(yyin), buf, (yy_size_t) max_size )) < 0 ) \\");
outn ("\t{ \\");
outn ("\t\tif( errno != EINTR) \\");
outn ("\t\t{ \\");
@@ -1891,7 +1891,7 @@ void make_tables (void)
outn ("\tif ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\");
outn ("\t\t{ \\");
outn ("\t\tint c = '*'; \\");
- outn ("\t\tsize_t n; \\");
+ outn ("\t\tint n; \\");
outn ("\t\tfor ( n = 0; n < max_size && \\");
outn ("\t\t\t (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\");
outn ("\t\t\tbuf[n] = (char) c; \\");
@@ -1904,7 +1904,7 @@ void make_tables (void)
outn ("\telse \\");
outn ("\t\t{ \\");
outn ("\t\terrno=0; \\");
- outn ("\t\twhile ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \\");
+ outn ("\t\twhile ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \\");
outn ("\t\t\t{ \\");
outn ("\t\t\tif( errno != EINTR) \\");
outn ("\t\t\t\t{ \\");