hw/xwin: Fix using index as a local variable shadows index()
Using index as a local variable shadows index() from strings.h winprefs.c: In function ‘LoadImageComma’: winprefs.c:574:7: error: declaration of ‘index’ shadows a global declaration Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net>
This commit is contained in:
parent
2d9123fd0c
commit
21faee4b38
|
@ -535,21 +535,21 @@ static HICON
|
|||
LoadImageComma(char *fname, int sx, int sy, int flags)
|
||||
{
|
||||
HICON hicon;
|
||||
int index;
|
||||
int i;
|
||||
char file[PATH_MAX + NAME_MAX + 2];
|
||||
|
||||
/* Some input error checking */
|
||||
if (!fname || !fname[0])
|
||||
return NULL;
|
||||
|
||||
index = 0;
|
||||
i = 0;
|
||||
hicon = NULL;
|
||||
|
||||
if (fname[0] == ',') {
|
||||
/* It's the XWIN.EXE resource they want */
|
||||
index = atoi(fname + 1);
|
||||
i = atoi(fname + 1);
|
||||
hicon = LoadImage(g_hInstance,
|
||||
MAKEINTRESOURCE(index), IMAGE_ICON, sx, sy, flags);
|
||||
MAKEINTRESOURCE(i), IMAGE_ICON, sx, sy, flags);
|
||||
}
|
||||
else {
|
||||
file[0] = 0;
|
||||
|
@ -566,8 +566,8 @@ LoadImageComma(char *fname, int sx, int sy, int flags)
|
|||
/* Specified as <fname>,<index> */
|
||||
|
||||
*(strrchr(file, ',')) = 0; /* End string at comma */
|
||||
index = atoi(strrchr(fname, ',') + 1);
|
||||
hicon = ExtractIcon(g_hInstance, file, index);
|
||||
i = atoi(strrchr(fname, ',') + 1);
|
||||
hicon = ExtractIcon(g_hInstance, file, i);
|
||||
}
|
||||
else {
|
||||
/* Just an .ico file... */
|
||||
|
|
Loading…
Reference in New Issue
Block a user