summaryrefslogtreecommitdiff
path: root/gen.c
diff options
context:
space:
mode:
authorWill Estes <wlestes@users.sourceforge.net>2001-06-24 22:33:13 +0000
committerWill Estes <wlestes@users.sourceforge.net>2001-06-24 22:33:13 +0000
commit61eb82e01b03b75d286ff184b63c04eb89b95c8b (patch)
treed74d70c33a8f4dc06d2c3fd99aab4d9e95817d6e /gen.c
parent3d75cab2a0aad4e6cafa0b4918aa3412e41d87cb (diff)
change some int types to size_t as per FreeBSD 28364 from avn@any.ru
Diffstat (limited to 'gen.c')
-rw-r--r--gen.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gen.c b/gen.c
index 20a23d3..4048d38 100644
--- a/gen.c
+++ b/gen.c
@@ -1074,11 +1074,11 @@ void make_tables()
if ( yymore_used && ! yytext_is_array )
{
indent_puts( "YY_G(yytext_ptr) -= YY_G(yy_more_len); \\" );
- indent_puts( "YY_G(yyleng) = (int) (yy_cp - YY_G(yytext_ptr)); \\" );
+ indent_puts( "YY_G(yyleng) = (size_t) (yy_cp - YY_G(yytext_ptr)); \\" );
}
else
- indent_puts( "YY_G(yyleng) = (int) (yy_cp - yy_bp); \\" );
+ indent_puts( "YY_G(yyleng) = (size_t) (yy_cp - yy_bp); \\" );
/* Now also deal with copying yytext_ptr to yytext if needed. */
skelout();
@@ -1355,7 +1355,8 @@ void make_tables()
outn(
"\tif ( YY_G(yy_current_buffer)->yy_is_interactive ) \\" );
outn( "\t\t{ \\" );
- outn( "\t\tint c = '*', n; \\" );
+ outn( "\t\tint c = '*'; \\");
+ outn( "\t\tsize_t n; \\" );
outn( "\t\tfor ( n = 0; n < max_size && \\" );
outn( "\t\t\t (c = getc( YY_G(yyin) )) != EOF && c != '\\n'; ++n ) \\" );
outn( "\t\t\tbuf[n] = (char) c; \\" );