Commit 5610c2cc authored by Alan Coopersmith's avatar Alan Coopersmith

Fix -image argument parsing to not shadow "i" variable

Also avoids starting at the wrong argument if -image is not the first
flag passed to xcompmgr (though that's not really supported in the
current syntax).

Fixes gcc warning:
xcursorgen.c: In function `main':
xcursorgen.c:394: warning: declaration of 'i' shadows a previous local
xcursorgen.c:377: warning: shadowed declaration is here
Signed-off-by: Alan Coopersmith's avatarAlan Coopersmith <>
Reviewed-by: Jeremy Huddleston Sequoia's avatarJeremy Huddleston <>
parent 471a4ef7
......@@ -391,13 +391,11 @@ main (int argc, char *argv[])
if (strcmp (argv[i], "-image") == 0)
int i = 2;
int ret = 0;
while (argv[i])
while (argv[++i])
if (check_image (argv[i]))
ret = i;
return ret;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment