diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-01-09 23:06:08 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2020-01-10 00:25:46 +0100 |
commit | 4b8194e1eafb9fd788b814921f9e2518a2079344 (patch) | |
tree | 75377cbeef2555fcb49719787494d2f136dfb9ae /nx-X11/programs/Xserver/mi/mibitblt.c | |
parent | 1a1ace774f49bccbb4760b4a0c58e56bf46548db (diff) | |
download | nx-libs-4b8194e1eafb9fd788b814921f9e2518a2079344.tar.gz nx-libs-4b8194e1eafb9fd788b814921f9e2518a2079344.tar.bz2 nx-libs-4b8194e1eafb9fd788b814921f9e2518a2079344.zip |
mi: fix shadow warnings
Based on the following commit. But for mispans.c I think the first
contained fix is wrong (nested loop with variable i) so I took another
approach.
commit f02e27e4fcc34413b2051e5a01edc92172fa8612
Author: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Date: Tue Oct 16 02:16:17 2012 -0500
mi: fix shadow warnings
mibitblt.c: In function 'miGetImage':
mibitblt.c:617:20: warning: declaration of 'pt' shadows a previous local
mibitblt.c:609:17: warning: shadowed declaration is here
mispans.c: In function 'miFillUniqueSpanGroup':
mispans.c:456:33: warning: declaration of 'i' shadows a previous local
mispans.c:382:9: warning: shadowed declaration is here
mispans.c:488:17: warning: declaration of 'i' shadows a previous local
mispans.c:382:9: warning: shadowed declaration is here
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fixes these warnings:
mi/mispans.c: fix shadowed vars
mispans.c: In function ‘miFillUniqueSpanGroup’:
mispans.c:465:12: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local]
int i;
^
mispans.c:387:21: note: shadowed declaration is here
register int i;
^
mispans.c:497:10: warning: declaration of ‘i’ shadows a previous local [-Wshadow=compatible-local]
int i;
^
mispans.c:387:21: note: shadowed declaration is here
register int i;
^
mibitblt.c: In function ‘miGetImage’:
mibitblt.c:669:13: warning: declaration of ‘pt’ shadows a previous local [-Wshadow=compatible-local]
xPoint pt;
^~
mibitblt.c:659:18: note: shadowed declaration is here
DDXPointRec pt = {0, 0};
^~
Diffstat (limited to 'nx-X11/programs/Xserver/mi/mibitblt.c')
-rw-r--r-- | nx-X11/programs/Xserver/mi/mibitblt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nx-X11/programs/Xserver/mi/mibitblt.c b/nx-X11/programs/Xserver/mi/mibitblt.c index 67d36a742..7b1aca794 100644 --- a/nx-X11/programs/Xserver/mi/mibitblt.c +++ b/nx-X11/programs/Xserver/mi/mibitblt.c @@ -666,7 +666,7 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst) { if ( (((1<<depth)-1)&planeMask) != (1<<depth)-1 ) { - xPoint pt; + xPoint xpt; pGC = GetScratchGC(depth, pDraw->pScreen); if (!pGC) @@ -683,9 +683,9 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst) * Clear the pixmap before doing anything else */ ValidateGC((DrawablePtr)pPixmap, pGC); - pt.x = pt.y = 0; + xpt.x = xpt.y = 0; width = w; - (*pGC->ops->FillSpans)((DrawablePtr)pPixmap, pGC, 1, &pt, &width, + (*pGC->ops->FillSpans)((DrawablePtr)pPixmap, pGC, 1, &xpt, &width, TRUE); /* alu is already GXCopy */ |