From f860489a38a81fe9003e3acac83ce2f6a5cb9185 Mon Sep 17 00:00:00 2001 From: lukem Date: Thu, 14 Jan 1999 06:58:40 +0000 Subject: [PATCH] remove "unused function yy_flex_realloc()" warning if using %options yylineno --- usr.bin/lex/flex.skl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/usr.bin/lex/flex.skl b/usr.bin/lex/flex.skl index 26b5fe2a9c90..11644bd286da 100644 --- a/usr.bin/lex/flex.skl +++ b/usr.bin/lex/flex.skl @@ -1,7 +1,7 @@ /* A lexical scanner generated by flex */ /* Scanner skeleton version: - * $NetBSD: flex.skl,v 1.9 1998/01/05 05:15:47 perry Exp $ + * $NetBSD: flex.skl,v 1.10 1999/01/14 06:58:40 lukem Exp $ */ #define FLEX_SCANNER @@ -254,10 +254,6 @@ YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); %* -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); - #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ @@ -279,6 +275,11 @@ static void yy_flex_free YY_PROTO(( void * )); %% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here %- Standard (non-C++) definition +static void *yy_flex_alloc YY_PROTO(( yy_size_t )); +#ifndef YY_USES_REJECT +static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); +#endif +static void yy_flex_free YY_PROTO(( void * )); static yy_state_type yy_get_previous_state YY_PROTO(( void )); static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); static int yy_get_next_buffer YY_PROTO(( void )); @@ -1504,6 +1505,7 @@ yy_size_t size; return (void *) malloc( size ); } +#ifndef YY_USES_REJECT #ifdef YY_USE_PROTOS static void *yy_flex_realloc( void *ptr, yy_size_t size ) #else @@ -1521,6 +1523,7 @@ yy_size_t size; */ return (void *) realloc( (char *) ptr, size ); } +#endif #ifdef YY_USE_PROTOS static void yy_flex_free( void *ptr )