From 97e9c34687f7dc05ee0bdef097a19e7623fb59a3 Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Wed, 25 Jan 2012 19:07:49 +0000 Subject: [PATCH] hw/xwin: Fix using menu as a formal parameter shadows a global variable of the same name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using menu as a formal parameter shadows a global variable of the same name winprefsyacc.y: In function ‘SetRootMenu’: winprefsyacc.y:286:20: error: declaration of ‘menu’ shadows a global declaration winprefsyacc.y:55:19: error: shadowed declaration is here winprefsyacc.y: In function ‘SetDefaultSysMenu’: winprefsyacc.y:293:26: error: declaration of ‘menu’ shadows a global declaration winprefsyacc.y:55:19: error: shadowed declaration is here Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/winprefsyacc.y | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xwin/winprefsyacc.y b/hw/xwin/winprefsyacc.y index 19c2f4067..3b376b3e7 100644 --- a/hw/xwin/winprefsyacc.y +++ b/hw/xwin/winprefsyacc.y @@ -283,16 +283,16 @@ SetTrayIcon (char *fname) } static void -SetRootMenu (char *menu) +SetRootMenu (char *menuname) { - strncpy (pref.rootMenuName, menu, MENU_MAX); + strncpy (pref.rootMenuName, menuname, MENU_MAX); pref.rootMenuName[MENU_MAX] = 0; } static void -SetDefaultSysMenu (char *menu, int pos) +SetDefaultSysMenu (char *menuname, int pos) { - strncpy (pref.defaultSysMenuName, menu, MENU_MAX); + strncpy (pref.defaultSysMenuName, menuname, MENU_MAX); pref.defaultSysMenuName[MENU_MAX] = 0; pref.defaultSysMenuPos = pos; }