159557
commit 3946924ed5e77420c453bf841603c7278766093a
159557
Author: rlar <rlar>
159557
Date:   Sun Feb 28 15:20:31 2016 +0100
159557
159557
    generated code, `max_size' seems to be of type `int', fix casts accordingly
159557
159557
Index: b/src/gen.c
159557
===================================================================
159557
--- a/src/gen.c
159557
+++ b/src/gen.c
159557
@@ -1875,7 +1875,7 @@ void make_tables (void)
159557
 	if (!C_plus_plus) {
159557
 		if (use_read) {
159557
 			outn ("\terrno=0; \\");
159557
-			outn ("\twhile ( (result = (int) read( fileno(yyin), buf, max_size )) < 0 ) \\");
159557
+			outn ("\twhile ( (result = (int) read( fileno(yyin), buf, (yy_size_t) max_size )) < 0 ) \\");
159557
 			outn ("\t{ \\");
159557
 			outn ("\t\tif( errno != EINTR) \\");
159557
 			outn ("\t\t{ \\");
159557
@@ -1891,7 +1891,7 @@ void make_tables (void)
159557
 			outn ("\tif ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\");
159557
 			outn ("\t\t{ \\");
159557
 			outn ("\t\tint c = '*'; \\");
159557
-			outn ("\t\tsize_t n; \\");
159557
+			outn ("\t\tint n; \\");
159557
 			outn ("\t\tfor ( n = 0; n < max_size && \\");
159557
 			outn ("\t\t\t     (c = getc( yyin )) != EOF && c != '\\n'; ++n ) \\");
159557
 			outn ("\t\t\tbuf[n] = (char) c; \\");
159557
@@ -1904,7 +1904,7 @@ void make_tables (void)
159557
 			outn ("\telse \\");
159557
 			outn ("\t\t{ \\");
159557
 			outn ("\t\terrno=0; \\");
159557
-			outn ("\t\twhile ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \\");
159557
+			outn ("\t\twhile ( (result = (int) fread(buf, 1, (yy_size_t) max_size, yyin)) == 0 && ferror(yyin)) \\");
159557
 			outn ("\t\t\t{ \\");
159557
 			outn ("\t\t\tif( errno != EINTR) \\");
159557
 			outn ("\t\t\t\t{ \\");