From 451c5d9175cdeb36fd614502ff0317f968490dfc Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Wed, 25 Jan 2012 19:09:12 +0000 Subject: [PATCH] hw/xwin: Fix using index as a formal parameter in winscrinit.c shadows index() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using index as a local variable shadows index() from strings.h winscrinit.c: In function ‘winFinishScreenInitFB’: winscrinit.c:274:28: error: declaration of ‘index’ shadows a global declaration winscrinit.c: In function ‘winFinishScreenInitNativeGDI’: winscrinit.c:623:35: error: declaration of ‘index’ shadows a global declaration Signed-off-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/winscrinit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xwin/winscrinit.c b/hw/xwin/winscrinit.c index be25f12af..639a99ca3 100644 --- a/hw/xwin/winscrinit.c +++ b/hw/xwin/winscrinit.c @@ -254,7 +254,7 @@ winCreateScreenResources(ScreenPtr pScreen) /* See Porting Layer Definition - p. 20 */ Bool -winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv) +winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv) { winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; @@ -578,11 +578,11 @@ winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv) /* See Porting Layer Definition - p. 20 */ Bool -winFinishScreenInitNativeGDI(int index, +winFinishScreenInitNativeGDI(int i, ScreenPtr pScreen, int argc, char **argv) { winScreenPriv(pScreen); - winScreenInfoPtr pScreenInfo = &g_ScreenInfo[index]; + winScreenInfoPtr pScreenInfo = &g_ScreenInfo[i]; VisualPtr pVisuals = NULL; DepthPtr pDepths = NULL; VisualID rootVisual = 0;