Skip to content

Commit

Permalink
avoid warning, add (int) cast to the read() return value
Browse files Browse the repository at this point in the history
For similiarity with the fread() case.
  • Loading branch information
rlar authored and westes committed Mar 1, 2016
1 parent 265e8e5 commit 455205b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,7 @@ void make_tables (void)
if (!C_plus_plus) {
if (use_read) {
outn ("\terrno=0; \\");
outn ("\twhile ( (result = read( fileno(yyin), (char *) buf, max_size )) < 0 ) \\");
outn ("\twhile ( (result = (int) read( fileno(yyin), buf, max_size )) < 0 ) \\");
outn ("\t{ \\");
outn ("\t\tif( errno != EINTR) \\");
outn ("\t\t{ \\");
Expand Down

0 comments on commit 455205b

Please sign in to comment.