From 3c3e11cb02886d05694b72c29c3deca0e3170c71 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Thu, 9 Jan 2020 22:35:01 +0100 Subject: CheckForEmptyMask does not need to declare int n twice commit 424dbde891486ad6a6c00c61a334031ff18f5556 Author: Alan Coopersmith Date: Fri Dec 9 10:08:55 2011 -0800 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 --- nx-X11/programs/Xserver/dix/cursor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nx-X11/programs/Xserver/dix') diff --git a/nx-X11/programs/Xserver/dix/cursor.c b/nx-X11/programs/Xserver/dix/cursor.c index 658edcb87..8f6f82c6d 100644 --- a/nx-X11/programs/Xserver/dix/cursor.c +++ b/nx-X11/programs/Xserver/dix/cursor.c @@ -145,7 +145,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; } -- cgit v1.2.3