From 424dbde891486ad6a6c00c61a334031ff18f5556 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 9 Dec 2011 10:08:55 -0800 Subject: [PATCH] CheckForEmptyMask does not need to declare int n twice Just use the existing n variable again in the ARGB_CURSOR loop instead of creating another one. Fixes gcc -Wshadow warning: cursor.c: In function 'CheckForEmptyMask': cursor.c:155:6: warning: declaration of 'n' shadows a previous local cursor.c:146:9: warning: shadowed declaration is here Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer --- dix/cursor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dix/cursor.c b/dix/cursor.c index f29cb1125..6bff44723 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -152,7 +152,7 @@ CheckForEmptyMask(CursorBitsPtr bits) if (bits->argb) { CARD32 *argb = bits->argb; - int n = bits->width * bits->height; + n = bits->width * bits->height; while (n--) if (*argb++ & 0xff000000) return; }