Fixes to pass -Wall

This commit is contained in:
christos 2009-10-27 01:44:01 +00:00
parent 5dba8dab3d
commit 0918f42ca7
2 changed files with 7 additions and 3 deletions

View File

@ -994,10 +994,12 @@ extern int yywrap M4_YY_PARAMS( M4_YY_PROTO_ONLY_ARG );
#endif
%not-for-header
#ifndef YY_NO_UNPUT
m4_ifdef( [[M4_YY_NO_UNPUT]],,
[[
static void yyunput M4_YY_PARAMS( int c, char *buf_ptr M4_YY_PROTO_LAST_ARG);
]])
#endif
%ok-for-header
%endif
@ -1092,7 +1094,7 @@ m4_ifdef( [[M4_YY_NOT_IN_HEADER]],
%% [5.0] fread()/read() definition of YY_INPUT goes here unless we're doing C++ \
\
%if-c++-only C++ definition \
if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \
if ( (int)(result = LexerInput( (char *) buf, max_size )) < 0 ) \
YY_FATAL_ERROR( "input in flex scanner failed" );
%endif
@ -1768,6 +1770,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
}
#ifndef YY_NO_UNPUT
%if-c-only
m4_ifdef( [[M4_YY_NO_UNPUT]],,
[[
@ -1823,6 +1826,7 @@ m4_ifdef( [[M4_YY_USE_LINENO]],
%if-c-only
]])
%endif
#endif
%if-c-only
#ifndef YY_NO_INPUT

View File

@ -1,4 +1,4 @@
/* $NetBSD: gen.c,v 1.3 2009/10/26 19:23:33 christos Exp $ */
/* $NetBSD: gen.c,v 1.4 2009/10/27 01:44:01 christos Exp $ */
/* gen - actual generation (writing) of flex scanners */
@ -1893,7 +1893,7 @@ void make_tables ()
outn ("\tif ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \\");
outn ("\t\t{ \\");
outn ("\t\tint c = '*'; \\");
outn ("\t\tint n; \\");
outn ("\t\tsize_t 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; \\");