From 0918f42ca7c82be3bcd41c2461432cd3e3ad81da Mon Sep 17 00:00:00 2001 From: christos Date: Tue, 27 Oct 2009 01:44:01 +0000 Subject: [PATCH] Fixes to pass -Wall --- external/bsd/flex/dist/flex.skl | 6 +++++- external/bsd/flex/dist/gen.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/external/bsd/flex/dist/flex.skl b/external/bsd/flex/dist/flex.skl index 6ebf2fd3dc2d..060133a91fc9 100644 --- a/external/bsd/flex/dist/flex.skl +++ b/external/bsd/flex/dist/flex.skl @@ -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 diff --git a/external/bsd/flex/dist/gen.c b/external/bsd/flex/dist/gen.c index 483bc27e113e..9e781710c3ec 100644 --- a/external/bsd/flex/dist/gen.c +++ b/external/bsd/flex/dist/gen.c @@ -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; \\");