mirror of
https://github.com/amiwm/amiwm.git
synced 2026-04-14 11:04:18 +00:00
[amiwm] Do another pass to clean up build warnings
This is mostly a "dangling if" cleanup, but I did add some other comments here and there!
This commit is contained in:
172
kbdlexer.c
172
kbdlexer.c
@@ -1,5 +1,3 @@
|
||||
int yywrap() { return 1; }
|
||||
|
||||
|
||||
#line 2 "<stdout>"
|
||||
|
||||
@@ -10,89 +8,11 @@ int yywrap() { return 1; }
|
||||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 6
|
||||
#define YY_FLEX_SUBMINOR_VERSION 3
|
||||
#define YY_FLEX_SUBMINOR_VERSION 4
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
|
||||
#define yy_create_buffer yy_create_buffer
|
||||
|
||||
#define yy_delete_buffer yy_delete_buffer
|
||||
|
||||
#define yy_scan_buffer yy_scan_buffer
|
||||
|
||||
#define yy_scan_string yy_scan_string
|
||||
|
||||
#define yy_scan_bytes yy_scan_bytes
|
||||
|
||||
#define yy_init_buffer yy_init_buffer
|
||||
|
||||
#define yy_flush_buffer yy_flush_buffer
|
||||
|
||||
#define yy_load_buffer_state yy_load_buffer_state
|
||||
|
||||
#define yy_switch_to_buffer yy_switch_to_buffer
|
||||
|
||||
#define yypush_buffer_state yypush_buffer_state
|
||||
|
||||
#define yypop_buffer_state yypop_buffer_state
|
||||
|
||||
#define yyensure_buffer_stack yyensure_buffer_stack
|
||||
|
||||
#define yylex yylex
|
||||
|
||||
#define yyrestart yyrestart
|
||||
|
||||
#define yylex_init yylex_init
|
||||
|
||||
#define yylex_init_extra yylex_init_extra
|
||||
|
||||
#define yylex_destroy yylex_destroy
|
||||
|
||||
#define yyget_debug yyget_debug
|
||||
|
||||
#define yyset_debug yyset_debug
|
||||
|
||||
#define yyget_extra yyget_extra
|
||||
|
||||
#define yyset_extra yyset_extra
|
||||
|
||||
#define yyget_in yyget_in
|
||||
|
||||
#define yyset_in yyset_in
|
||||
|
||||
#define yyget_out yyget_out
|
||||
|
||||
#define yyset_out yyset_out
|
||||
|
||||
#define yyget_leng yyget_leng
|
||||
|
||||
#define yyget_text yyget_text
|
||||
|
||||
#define yyget_lineno yyget_lineno
|
||||
|
||||
#define yyset_lineno yyset_lineno
|
||||
|
||||
#define yywrap yywrap
|
||||
|
||||
#define yyalloc yyalloc
|
||||
|
||||
#define yyrealloc yyrealloc
|
||||
|
||||
#define yyfree yyfree
|
||||
|
||||
#define yytext yytext
|
||||
|
||||
#define yyleng yyleng
|
||||
|
||||
#define yyin yyin
|
||||
|
||||
#define yyout yyout
|
||||
|
||||
#define yy_flex_debug yy_flex_debug
|
||||
|
||||
#define yylineno yylineno
|
||||
|
||||
/* First, we deal with platform-specific or compiler-specific issues. */
|
||||
|
||||
/* begin standard C headers. */
|
||||
@@ -110,7 +30,8 @@ int yywrap() { return 1; }
|
||||
|
||||
/* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */
|
||||
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#if defined(__FreeBSD__) || \
|
||||
(defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
|
||||
|
||||
/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,
|
||||
* if you want the limit (max/min) macros for int types.
|
||||
@@ -163,10 +84,16 @@ typedef unsigned int flex_uint32_t;
|
||||
#define UINT32_MAX (4294967295U)
|
||||
#endif
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX (~(size_t)0)
|
||||
#endif
|
||||
|
||||
#endif /* ! C99 */
|
||||
|
||||
#endif /* ! FLEXINT_H */
|
||||
|
||||
/* begin standard C++ headers. */
|
||||
|
||||
/* TODO: this is always defined, so inline it */
|
||||
#define yyconst const
|
||||
|
||||
@@ -198,7 +125,7 @@ typedef unsigned int flex_uint32_t;
|
||||
/* Action number for EOF rule of a given start state. */
|
||||
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
||||
/* Special action meaning "start processing a new file". */
|
||||
#define YY_NEW_FILE yyrestart(yyin )
|
||||
#define YY_NEW_FILE yyrestart( yyin )
|
||||
#define YY_END_OF_BUFFER_CHAR 0
|
||||
|
||||
/* Size of default input buffer. */
|
||||
@@ -333,6 +260,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
|
||||
#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \
|
||||
? (yy_buffer_stack)[(yy_buffer_stack_top)] \
|
||||
: NULL)
|
||||
#define yy_current_buffer YY_CURRENT_BUFFER
|
||||
/* Same as previous macro, but useful when we know that the buffer stack is not
|
||||
* NULL or when we need an lvalue. For internal use only.
|
||||
*/
|
||||
@@ -364,7 +292,7 @@ void yypop_buffer_state ( void );
|
||||
static void yyensure_buffer_stack ( void );
|
||||
static void yy_load_buffer_state ( void );
|
||||
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
|
||||
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
|
||||
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
|
||||
|
||||
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
|
||||
YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
|
||||
@@ -380,7 +308,7 @@ void yyfree ( void * );
|
||||
if ( ! YY_CURRENT_BUFFER ){ \
|
||||
yyensure_buffer_stack (); \
|
||||
YY_CURRENT_BUFFER_LVALUE = \
|
||||
yy_create_buffer(yyin,YY_BUF_SIZE ); \
|
||||
yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
||||
} \
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
|
||||
}
|
||||
@@ -389,7 +317,7 @@ void yyfree ( void * );
|
||||
if ( ! YY_CURRENT_BUFFER ){\
|
||||
yyensure_buffer_stack (); \
|
||||
YY_CURRENT_BUFFER_LVALUE = \
|
||||
yy_create_buffer(yyin,YY_BUF_SIZE ); \
|
||||
yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
||||
} \
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
|
||||
}
|
||||
@@ -624,8 +552,8 @@ int parse_keyword(char *str, YYSTYPE *val)
|
||||
return ERRORTOKEN;
|
||||
}
|
||||
|
||||
#line 625 "<stdout>"
|
||||
#line 626 "<stdout>"
|
||||
#line 555 "<stdout>"
|
||||
#line 556 "<stdout>"
|
||||
|
||||
#define INITIAL 0
|
||||
|
||||
@@ -835,17 +763,17 @@ YY_DECL
|
||||
if ( ! YY_CURRENT_BUFFER ) {
|
||||
yyensure_buffer_stack ();
|
||||
YY_CURRENT_BUFFER_LVALUE =
|
||||
yy_create_buffer(yyin,YY_BUF_SIZE );
|
||||
yy_create_buffer( yyin, YY_BUF_SIZE );
|
||||
}
|
||||
|
||||
yy_load_buffer_state( );
|
||||
yy_load_buffer_state( );
|
||||
}
|
||||
|
||||
{
|
||||
#line 108 "kbdlexer.l"
|
||||
|
||||
|
||||
#line 846 "<stdout>"
|
||||
#line 776 "<stdout>"
|
||||
|
||||
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
|
||||
{
|
||||
@@ -958,7 +886,7 @@ YY_RULE_SETUP
|
||||
#line 137 "kbdlexer.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 959 "<stdout>"
|
||||
#line 889 "<stdout>"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
yyterminate();
|
||||
|
||||
@@ -1036,7 +964,7 @@ case YY_STATE_EOF(INITIAL):
|
||||
{
|
||||
(yy_did_buffer_switch_on_eof) = 0;
|
||||
|
||||
if ( yywrap( ) )
|
||||
if ( yywrap( ) )
|
||||
{
|
||||
/* Note: because we've taken care in
|
||||
* yy_get_next_buffer() to have set up
|
||||
@@ -1168,7 +1096,8 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
b->yy_ch_buf = (char *)
|
||||
/* Include room in for 2 EOB chars. */
|
||||
yyrealloc((void *) b->yy_ch_buf,(yy_size_t) (b->yy_buf_size + 2) );
|
||||
yyrealloc( (void *) b->yy_ch_buf,
|
||||
(yy_size_t) (b->yy_buf_size + 2) );
|
||||
}
|
||||
else
|
||||
/* Can't grow it, we don't own it. */
|
||||
@@ -1200,7 +1129,7 @@ static int yy_get_next_buffer (void)
|
||||
if ( number_to_move == YY_MORE_ADJ )
|
||||
{
|
||||
ret_val = EOB_ACT_END_OF_FILE;
|
||||
yyrestart(yyin );
|
||||
yyrestart( yyin );
|
||||
}
|
||||
|
||||
else
|
||||
@@ -1217,9 +1146,12 @@ static int yy_get_next_buffer (void)
|
||||
if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
||||
/* Extend the array by 50%, plus the number we really need. */
|
||||
int 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,(yy_size_t) new_size );
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
|
||||
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
|
||||
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
||||
/* "- 2" to take care of EOB's */
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
|
||||
}
|
||||
|
||||
(yy_n_chars) += number_to_move;
|
||||
@@ -1370,14 +1302,18 @@ static int yy_get_next_buffer (void)
|
||||
*/
|
||||
|
||||
/* Reset buffer status. */
|
||||
yyrestart(yyin );
|
||||
yyrestart( yyin );
|
||||
|
||||
/*FALLTHROUGH*/
|
||||
|
||||
case EOB_ACT_END_OF_FILE:
|
||||
{
|
||||
if ( yywrap( ) )
|
||||
if ( yywrap( ) )
|
||||
#ifdef YY_FLEX_LEX_COMPAT
|
||||
return 0;
|
||||
#else
|
||||
return EOF;
|
||||
#endif
|
||||
|
||||
if ( ! (yy_did_buffer_switch_on_eof) )
|
||||
YY_NEW_FILE;
|
||||
@@ -1414,11 +1350,11 @@ static int yy_get_next_buffer (void)
|
||||
if ( ! YY_CURRENT_BUFFER ){
|
||||
yyensure_buffer_stack ();
|
||||
YY_CURRENT_BUFFER_LVALUE =
|
||||
yy_create_buffer(yyin,YY_BUF_SIZE );
|
||||
yy_create_buffer( yyin, YY_BUF_SIZE );
|
||||
}
|
||||
|
||||
yy_init_buffer(YY_CURRENT_BUFFER,input_file );
|
||||
yy_load_buffer_state( );
|
||||
yy_init_buffer( YY_CURRENT_BUFFER, input_file );
|
||||
yy_load_buffer_state( );
|
||||
}
|
||||
|
||||
/** Switch to a different input buffer.
|
||||
@@ -1446,7 +1382,7 @@ static int yy_get_next_buffer (void)
|
||||
}
|
||||
|
||||
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
||||
yy_load_buffer_state( );
|
||||
yy_load_buffer_state( );
|
||||
|
||||
/* We don't actually know whether we did this switch during
|
||||
* EOF (yywrap()) processing, but the only time this flag
|
||||
@@ -1474,7 +1410,7 @@ static void yy_load_buffer_state (void)
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
|
||||
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
|
||||
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||||
|
||||
@@ -1483,13 +1419,13 @@ static void yy_load_buffer_state (void)
|
||||
/* yy_ch_buf has to be 2 characters longer than the size given because
|
||||
* we need to put in 2 end-of-buffer characters.
|
||||
*/
|
||||
b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2) );
|
||||
b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
|
||||
if ( ! b->yy_ch_buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||||
|
||||
b->yy_is_our_buffer = 1;
|
||||
|
||||
yy_init_buffer(b,file );
|
||||
yy_init_buffer( b, file );
|
||||
|
||||
return b;
|
||||
}
|
||||
@@ -1508,9 +1444,9 @@ static void yy_load_buffer_state (void)
|
||||
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
||||
|
||||
if ( b->yy_is_our_buffer )
|
||||
yyfree((void *) b->yy_ch_buf );
|
||||
yyfree( (void *) b->yy_ch_buf );
|
||||
|
||||
yyfree((void *) b );
|
||||
yyfree( (void *) b );
|
||||
}
|
||||
|
||||
/* Initializes or reinitializes a buffer.
|
||||
@@ -1522,7 +1458,7 @@ static void yy_load_buffer_state (void)
|
||||
{
|
||||
int oerrno = errno;
|
||||
|
||||
yy_flush_buffer(b );
|
||||
yy_flush_buffer( b );
|
||||
|
||||
b->yy_input_file = file;
|
||||
b->yy_fill_buffer = 1;
|
||||
@@ -1565,7 +1501,7 @@ static void yy_load_buffer_state (void)
|
||||
b->yy_buffer_status = YY_BUFFER_NEW;
|
||||
|
||||
if ( b == YY_CURRENT_BUFFER )
|
||||
yy_load_buffer_state( );
|
||||
yy_load_buffer_state( );
|
||||
}
|
||||
|
||||
/** Pushes the new state onto the stack. The new state becomes
|
||||
@@ -1596,7 +1532,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
|
||||
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
||||
|
||||
/* copied from yy_switch_to_buffer. */
|
||||
yy_load_buffer_state( );
|
||||
yy_load_buffer_state( );
|
||||
(yy_did_buffer_switch_on_eof) = 1;
|
||||
}
|
||||
|
||||
@@ -1615,7 +1551,7 @@ void yypop_buffer_state (void)
|
||||
--(yy_buffer_stack_top);
|
||||
|
||||
if (YY_CURRENT_BUFFER) {
|
||||
yy_load_buffer_state( );
|
||||
yy_load_buffer_state( );
|
||||
(yy_did_buffer_switch_on_eof) = 1;
|
||||
}
|
||||
}
|
||||
@@ -1682,7 +1618,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
||||
/* They forgot to leave room for the EOB's. */
|
||||
return NULL;
|
||||
|
||||
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
|
||||
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
|
||||
|
||||
@@ -1696,7 +1632,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
||||
b->yy_fill_buffer = 0;
|
||||
b->yy_buffer_status = YY_BUFFER_NEW;
|
||||
|
||||
yy_switch_to_buffer(b );
|
||||
yy_switch_to_buffer( b );
|
||||
|
||||
return b;
|
||||
}
|
||||
@@ -1712,7 +1648,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
||||
YY_BUFFER_STATE yy_scan_string (const char * yystr )
|
||||
{
|
||||
|
||||
return yy_scan_bytes(yystr,(int) strlen(yystr) );
|
||||
return yy_scan_bytes( yystr, (int) strlen(yystr) );
|
||||
}
|
||||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
|
||||
@@ -1731,7 +1667,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
|
||||
|
||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||
n = (yy_size_t) (_yybytes_len + 2);
|
||||
buf = (char *) yyalloc(n );
|
||||
buf = (char *) yyalloc( n );
|
||||
if ( ! buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
|
||||
|
||||
@@ -1740,7 +1676,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
|
||||
|
||||
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
|
||||
|
||||
b = yy_scan_buffer(buf,n );
|
||||
b = yy_scan_buffer( buf, n );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
|
||||
|
||||
@@ -1758,7 +1694,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
|
||||
|
||||
static void yynoreturn yy_fatal_error (const char* msg )
|
||||
{
|
||||
(void) fprintf( stderr, "%s\n", msg );
|
||||
fprintf( stderr, "%s\n", msg );
|
||||
exit( YY_EXIT_FAILURE );
|
||||
}
|
||||
|
||||
@@ -1893,7 +1829,7 @@ int yylex_destroy (void)
|
||||
|
||||
/* Pop the buffer stack, destroying each element. */
|
||||
while(YY_CURRENT_BUFFER){
|
||||
yy_delete_buffer(YY_CURRENT_BUFFER );
|
||||
yy_delete_buffer( YY_CURRENT_BUFFER );
|
||||
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||||
yypop_buffer_state();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user