From 8f062f73805765f5769dfd7b738c8dd10062fba6 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Fri, 3 Oct 2014 14:12:57 +0100 Subject: [PATCH] hw/xwin: Fix warning in yyerror() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit winprefsyacc.y:257:3: warning: nested extern declaration of ‘yylineno’ [-Wnested-externs] Promote yylineno declaration to file scope Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/winprefsyacc.y | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/xwin/winprefsyacc.y b/hw/xwin/winprefsyacc.y index 92f222d4f..9bb28ae92 100644 --- a/hw/xwin/winprefsyacc.y +++ b/hw/xwin/winprefsyacc.y @@ -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; }