kbuild: scripts/genksyms/lex.l: add %option noinput
gcc 4.3 correctly determines that input() is unused and gives the following warning: <-- snip --> ... HOSTCC scripts/genksyms/lex.o scripts/genksyms/lex.c:1487: warning: ‘input’ defined but not used ... <-- snip --> Fix it by adding %option noinput to scripts/genksyms/lex.l and regeneration of scripts/genksyms/lex.c_shipped. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
be2be1d590
commit
11ddad3960
2 changed files with 88 additions and 47 deletions
|
@ -6,10 +6,19 @@
|
||||||
|
|
||||||
/* A lexical scanner generated by flex */
|
/* A lexical scanner generated by flex */
|
||||||
|
|
||||||
|
/* %not-for-header */
|
||||||
|
|
||||||
|
/* %if-c-only */
|
||||||
|
/* %if-not-reentrant */
|
||||||
|
|
||||||
|
/* %endif */
|
||||||
|
/* %endif */
|
||||||
|
/* %ok-for-header */
|
||||||
|
|
||||||
#define FLEX_SCANNER
|
#define FLEX_SCANNER
|
||||||
#define YY_FLEX_MAJOR_VERSION 2
|
#define YY_FLEX_MAJOR_VERSION 2
|
||||||
#define YY_FLEX_MINOR_VERSION 5
|
#define YY_FLEX_MINOR_VERSION 5
|
||||||
#define YY_FLEX_SUBMINOR_VERSION 33
|
#define YY_FLEX_SUBMINOR_VERSION 35
|
||||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||||
#define FLEX_BETA
|
#define FLEX_BETA
|
||||||
#endif
|
#endif
|
||||||
|
@ -47,7 +56,7 @@
|
||||||
|
|
||||||
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
||||||
|
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||||
|
|
||||||
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
||||||
* if you want the limit (max/min) macros for int types.
|
* if you want the limit (max/min) macros for int types.
|
||||||
|
@ -70,7 +79,6 @@ typedef int flex_int32_t;
|
||||||
typedef unsigned char flex_uint8_t;
|
typedef unsigned char flex_uint8_t;
|
||||||
typedef unsigned short int flex_uint16_t;
|
typedef unsigned short int flex_uint16_t;
|
||||||
typedef unsigned int flex_uint32_t;
|
typedef unsigned int flex_uint32_t;
|
||||||
#endif /* ! C99 */
|
|
||||||
|
|
||||||
/* Limits of integral types. */
|
/* Limits of integral types. */
|
||||||
#ifndef INT8_MIN
|
#ifndef INT8_MIN
|
||||||
|
@ -101,6 +109,8 @@ typedef unsigned int flex_uint32_t;
|
||||||
#define UINT32_MAX (4294967295U)
|
#define UINT32_MAX (4294967295U)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* ! C99 */
|
||||||
|
|
||||||
#endif /* ! FLEXINT_H */
|
#endif /* ! FLEXINT_H */
|
||||||
|
|
||||||
/* %endif */
|
/* %endif */
|
||||||
|
@ -115,11 +125,12 @@ typedef unsigned int flex_uint32_t;
|
||||||
|
|
||||||
#else /* ! __cplusplus */
|
#else /* ! __cplusplus */
|
||||||
|
|
||||||
#if __STDC__
|
/* C99 requires __STDC__ to be defined as 1. */
|
||||||
|
#if defined (__STDC__)
|
||||||
|
|
||||||
#define YY_USE_CONST
|
#define YY_USE_CONST
|
||||||
|
|
||||||
#endif /* __STDC__ */
|
#endif /* defined (__STDC__) */
|
||||||
#endif /* ! __cplusplus */
|
#endif /* ! __cplusplus */
|
||||||
|
|
||||||
#ifdef YY_USE_CONST
|
#ifdef YY_USE_CONST
|
||||||
|
@ -218,14 +229,9 @@ extern FILE *yyin, *yyout;
|
||||||
|
|
||||||
#define unput(c) yyunput( c, (yytext_ptr) )
|
#define unput(c) yyunput( c, (yytext_ptr) )
|
||||||
|
|
||||||
/* The following is because we cannot portably get our hands on size_t
|
|
||||||
* (without autoconf's help, which isn't available because we want
|
|
||||||
* flex-generated scanners to compile on their own).
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef YY_TYPEDEF_YY_SIZE_T
|
#ifndef YY_TYPEDEF_YY_SIZE_T
|
||||||
#define YY_TYPEDEF_YY_SIZE_T
|
#define YY_TYPEDEF_YY_SIZE_T
|
||||||
typedef unsigned int yy_size_t;
|
typedef size_t yy_size_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
#ifndef YY_STRUCT_YY_BUFFER_STATE
|
||||||
|
@ -401,7 +407,7 @@ void yyfree (void * );
|
||||||
/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
|
/* %% [1.0] yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here */
|
||||||
/* Begin user sect3 */
|
/* Begin user sect3 */
|
||||||
|
|
||||||
#define yywrap() 1
|
#define yywrap(n) 1
|
||||||
#define YY_SKIP_YYWRAP
|
#define YY_SKIP_YYWRAP
|
||||||
|
|
||||||
#define FLEX_DEBUG
|
#define FLEX_DEBUG
|
||||||
|
@ -613,8 +619,8 @@ int yy_flex_debug = 1;
|
||||||
|
|
||||||
static yyconst flex_int16_t yy_rule_linenum[13] =
|
static yyconst flex_int16_t yy_rule_linenum[13] =
|
||||||
{ 0,
|
{ 0,
|
||||||
69, 70, 71, 74, 77, 78, 79, 85, 86, 87,
|
71, 72, 73, 76, 79, 80, 81, 87, 88, 89,
|
||||||
89, 92
|
91, 94
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
/* The intent behind this definition is that it'll catch
|
/* The intent behind this definition is that it'll catch
|
||||||
|
@ -665,7 +671,8 @@ char *yytext;
|
||||||
quite so pedantic. */
|
quite so pedantic. */
|
||||||
|
|
||||||
/* We don't do multiple input files. */
|
/* We don't do multiple input files. */
|
||||||
#line 669 "scripts/genksyms/lex.c"
|
#define YY_NO_INPUT 1
|
||||||
|
#line 676 "scripts/genksyms/lex.c"
|
||||||
|
|
||||||
#define INITIAL 0
|
#define INITIAL 0
|
||||||
#define V2_TOKENS 1
|
#define V2_TOKENS 1
|
||||||
|
@ -695,9 +702,39 @@ static int yy_init_globals (void );
|
||||||
/* %endif */
|
/* %endif */
|
||||||
/* %if-reentrant */
|
/* %if-reentrant */
|
||||||
/* %endif */
|
/* %endif */
|
||||||
|
/* %endif End reentrant structures and macros. */
|
||||||
|
|
||||||
|
/* Accessor methods to globals.
|
||||||
|
These are made visible to non-reentrant scanners for convenience. */
|
||||||
|
|
||||||
|
int yylex_destroy (void );
|
||||||
|
|
||||||
|
int yyget_debug (void );
|
||||||
|
|
||||||
|
void yyset_debug (int debug_flag );
|
||||||
|
|
||||||
|
YY_EXTRA_TYPE yyget_extra (void );
|
||||||
|
|
||||||
|
void yyset_extra (YY_EXTRA_TYPE user_defined );
|
||||||
|
|
||||||
|
FILE *yyget_in (void );
|
||||||
|
|
||||||
|
void yyset_in (FILE * in_str );
|
||||||
|
|
||||||
|
FILE *yyget_out (void );
|
||||||
|
|
||||||
|
void yyset_out (FILE * out_str );
|
||||||
|
|
||||||
|
int yyget_leng (void );
|
||||||
|
|
||||||
|
char *yyget_text (void );
|
||||||
|
|
||||||
|
int yyget_lineno (void );
|
||||||
|
|
||||||
|
void yyset_lineno (int line_number );
|
||||||
|
|
||||||
/* %if-bison-bridge */
|
/* %if-bison-bridge */
|
||||||
/* %endif */
|
/* %endif */
|
||||||
/* %endif End reentrant structures and macros. */
|
|
||||||
|
|
||||||
/* Macros after this point can all be overridden by user definitions in
|
/* Macros after this point can all be overridden by user definitions in
|
||||||
* section 1.
|
* section 1.
|
||||||
|
@ -756,7 +793,7 @@ static int input (void );
|
||||||
/* This used to be an fputs(), but since the string might contain NUL's,
|
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||||
* we now use fwrite().
|
* we now use fwrite().
|
||||||
*/
|
*/
|
||||||
#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
|
#define ECHO fwrite( yytext, yyleng, 1, yyout )
|
||||||
/* %endif */
|
/* %endif */
|
||||||
/* %if-c++-only C++ definition */
|
/* %if-c++-only C++ definition */
|
||||||
/* %endif */
|
/* %endif */
|
||||||
|
@ -881,12 +918,12 @@ YY_DECL
|
||||||
register int yy_act;
|
register int yy_act;
|
||||||
|
|
||||||
/* %% [7.0] user's declarations go here */
|
/* %% [7.0] user's declarations go here */
|
||||||
#line 65 "scripts/genksyms/lex.l"
|
#line 67 "scripts/genksyms/lex.l"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Keep track of our location in the original source files. */
|
/* Keep track of our location in the original source files. */
|
||||||
#line 890 "scripts/genksyms/lex.c"
|
#line 927 "scripts/genksyms/lex.c"
|
||||||
|
|
||||||
if ( !(yy_init) )
|
if ( !(yy_init) )
|
||||||
{
|
{
|
||||||
|
@ -1004,42 +1041,42 @@ do_action: /* This label is used only to access EOF actions. */
|
||||||
case 1:
|
case 1:
|
||||||
/* rule 1 can match eol */
|
/* rule 1 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 69 "scripts/genksyms/lex.l"
|
#line 71 "scripts/genksyms/lex.l"
|
||||||
return FILENAME;
|
return FILENAME;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 2:
|
case 2:
|
||||||
/* rule 2 can match eol */
|
/* rule 2 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 70 "scripts/genksyms/lex.l"
|
#line 72 "scripts/genksyms/lex.l"
|
||||||
cur_line++;
|
cur_line++;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 3:
|
case 3:
|
||||||
/* rule 3 can match eol */
|
/* rule 3 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 71 "scripts/genksyms/lex.l"
|
#line 73 "scripts/genksyms/lex.l"
|
||||||
cur_line++;
|
cur_line++;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
/* Ignore all other whitespace. */
|
/* Ignore all other whitespace. */
|
||||||
case 4:
|
case 4:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 74 "scripts/genksyms/lex.l"
|
#line 76 "scripts/genksyms/lex.l"
|
||||||
;
|
;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 5:
|
case 5:
|
||||||
/* rule 5 can match eol */
|
/* rule 5 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 77 "scripts/genksyms/lex.l"
|
#line 79 "scripts/genksyms/lex.l"
|
||||||
return STRING;
|
return STRING;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 6:
|
case 6:
|
||||||
/* rule 6 can match eol */
|
/* rule 6 can match eol */
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 78 "scripts/genksyms/lex.l"
|
#line 80 "scripts/genksyms/lex.l"
|
||||||
return CHAR;
|
return CHAR;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 7:
|
case 7:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 79 "scripts/genksyms/lex.l"
|
#line 81 "scripts/genksyms/lex.l"
|
||||||
return IDENT;
|
return IDENT;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
/* The Pedant requires that the other C multi-character tokens be
|
/* The Pedant requires that the other C multi-character tokens be
|
||||||
|
@ -1048,36 +1085,36 @@ return IDENT;
|
||||||
around them properly. */
|
around them properly. */
|
||||||
case 8:
|
case 8:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 85 "scripts/genksyms/lex.l"
|
#line 87 "scripts/genksyms/lex.l"
|
||||||
return OTHER;
|
return OTHER;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 9:
|
case 9:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 86 "scripts/genksyms/lex.l"
|
#line 88 "scripts/genksyms/lex.l"
|
||||||
return INT;
|
return INT;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 10:
|
case 10:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 87 "scripts/genksyms/lex.l"
|
#line 89 "scripts/genksyms/lex.l"
|
||||||
return REAL;
|
return REAL;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 11:
|
case 11:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 89 "scripts/genksyms/lex.l"
|
#line 91 "scripts/genksyms/lex.l"
|
||||||
return DOTS;
|
return DOTS;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
/* All other tokens are single characters. */
|
/* All other tokens are single characters. */
|
||||||
case 12:
|
case 12:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 92 "scripts/genksyms/lex.l"
|
#line 94 "scripts/genksyms/lex.l"
|
||||||
return yytext[0];
|
return yytext[0];
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
case 13:
|
case 13:
|
||||||
YY_RULE_SETUP
|
YY_RULE_SETUP
|
||||||
#line 95 "scripts/genksyms/lex.l"
|
#line 97 "scripts/genksyms/lex.l"
|
||||||
ECHO;
|
ECHO;
|
||||||
YY_BREAK
|
YY_BREAK
|
||||||
#line 1081 "scripts/genksyms/lex.c"
|
#line 1118 "scripts/genksyms/lex.c"
|
||||||
case YY_STATE_EOF(INITIAL):
|
case YY_STATE_EOF(INITIAL):
|
||||||
case YY_STATE_EOF(V2_TOKENS):
|
case YY_STATE_EOF(V2_TOKENS):
|
||||||
yyterminate();
|
yyterminate();
|
||||||
|
@ -1346,6 +1383,14 @@ static int yy_get_next_buffer (void)
|
||||||
else
|
else
|
||||||
ret_val = EOB_ACT_CONTINUE_SCAN;
|
ret_val = EOB_ACT_CONTINUE_SCAN;
|
||||||
|
|
||||||
|
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
||||||
|
/* Extend the array by 50%, plus the number we really need. */
|
||||||
|
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
||||||
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
|
||||||
|
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
||||||
|
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
||||||
|
}
|
||||||
|
|
||||||
(yy_n_chars) += number_to_move;
|
(yy_n_chars) += number_to_move;
|
||||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR;
|
||||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
|
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR;
|
||||||
|
@ -1851,6 +1896,8 @@ static void yyensure_buffer_stack (void)
|
||||||
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
|
(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
|
||||||
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
||||||
);
|
);
|
||||||
|
if ( ! (yy_buffer_stack) )
|
||||||
|
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
||||||
|
|
||||||
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*));
|
||||||
|
|
||||||
|
@ -1869,6 +1916,8 @@ static void yyensure_buffer_stack (void)
|
||||||
((yy_buffer_stack),
|
((yy_buffer_stack),
|
||||||
num_to_alloc * sizeof(struct yy_buffer_state*)
|
num_to_alloc * sizeof(struct yy_buffer_state*)
|
||||||
);
|
);
|
||||||
|
if ( ! (yy_buffer_stack) )
|
||||||
|
YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
|
||||||
|
|
||||||
/* zero only the new slots.*/
|
/* zero only the new slots.*/
|
||||||
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
|
memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*));
|
||||||
|
@ -2092,7 +2141,7 @@ void yyset_debug (int bdebug )
|
||||||
/* %if-reentrant */
|
/* %if-reentrant */
|
||||||
/* %if-bison-bridge */
|
/* %if-bison-bridge */
|
||||||
/* %endif */
|
/* %endif */
|
||||||
/* %endif */
|
/* %endif if-c-only */
|
||||||
|
|
||||||
/* %if-c-only */
|
/* %if-c-only */
|
||||||
static int yy_init_globals (void)
|
static int yy_init_globals (void)
|
||||||
|
@ -2124,13 +2173,9 @@ static int yy_init_globals (void)
|
||||||
}
|
}
|
||||||
/* %endif */
|
/* %endif */
|
||||||
|
|
||||||
/* %if-c-or-c++ */
|
/* %if-c-only SNIP! this currently causes conflicts with the c++ scanner */
|
||||||
/* %if-c-only */
|
|
||||||
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
|
/* yylex_destroy is for both reentrant and non-reentrant scanners. */
|
||||||
int yylex_destroy (void)
|
int yylex_destroy (void)
|
||||||
/* %endif */
|
|
||||||
/* %if-c++-only */
|
|
||||||
/* %endif */
|
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Pop the buffer stack, destroying each element. */
|
/* Pop the buffer stack, destroying each element. */
|
||||||
|
@ -2144,11 +2189,6 @@ int yylex_destroy (void)
|
||||||
yyfree((yy_buffer_stack) );
|
yyfree((yy_buffer_stack) );
|
||||||
(yy_buffer_stack) = NULL;
|
(yy_buffer_stack) = NULL;
|
||||||
|
|
||||||
/* %if-c++-only */
|
|
||||||
/* %endif */
|
|
||||||
|
|
||||||
/* %if-c-only */
|
|
||||||
|
|
||||||
/* Reset the globals. This is important in a non-reentrant scanner so the next time
|
/* Reset the globals. This is important in a non-reentrant scanner so the next time
|
||||||
* yylex() is called, initialization will occur. */
|
* yylex() is called, initialization will occur. */
|
||||||
yy_init_globals( );
|
yy_init_globals( );
|
||||||
|
@ -2156,7 +2196,6 @@ int yylex_destroy (void)
|
||||||
/* %if-reentrant */
|
/* %if-reentrant */
|
||||||
/* %endif */
|
/* %endif */
|
||||||
return 0;
|
return 0;
|
||||||
/* %endif */
|
|
||||||
}
|
}
|
||||||
/* %endif */
|
/* %endif */
|
||||||
|
|
||||||
|
@ -2213,7 +2252,7 @@ void yyfree (void * ptr )
|
||||||
|
|
||||||
/* %ok-for-header */
|
/* %ok-for-header */
|
||||||
|
|
||||||
#line 95 "scripts/genksyms/lex.l"
|
#line 97 "scripts/genksyms/lex.l"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,8 @@ MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>)
|
||||||
/* We don't do multiple input files. */
|
/* We don't do multiple input files. */
|
||||||
%option noyywrap
|
%option noyywrap
|
||||||
|
|
||||||
|
%option noinput
|
||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue