hw/xwin: Fix warning in yyerror()

winprefsyacc.y:257:3: warning: nested extern declaration of ‘yylineno’ [-Wnested-externs]

Promote yylineno declaration to file scope

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
Jon TURNEY 2014-10-03 14:12:57 +01:00
parent f0f0c92a08
commit 8f062f7380

View File

@ -82,6 +82,7 @@ static void CloseSysMenu(void);
static int yyerror (const char *s);
extern char *yytext;
extern int yylineno;
extern int yylex(void);
%}
@ -254,8 +255,6 @@ debug: DEBUGOUTPUT STRING NEWLINE { ErrorF("LoadPreferences: %s\n", $2); free($
static int
yyerror (const char *s)
{
extern int yylineno; /* Handled by flex internally */
ErrorF("LoadPreferences: %s line %d\n", s, yylineno);
return 1;
}