[PATCH 04/12] fb: fix shadow warnings
Yaakov (Cygwin/X)
yselkowitz at users.sourceforge.net
Sat Oct 27 20:01:34 PDT 2012
From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
fbblt.c: In function 'fbBlt':
fbblt.c:76:16: warning: declaration of 'src' shadows a previous local
fbblt.c:52:13: warning: shadowed declaration is here
fbblt.c:77:16: warning: declaration of 'dst' shadows a previous local
fbblt.c:52:19: warning: shadowed declaration is here
fbbltone.c: In function 'fbBltPlane':
fbbltone.c:742:13: warning: declaration of 'w' shadows a previous local
fbbltone.c:725:9: warning: shadowed declaration is here
Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---
fb/fbblt.c | 12 ++++++------
fb/fbbltone.c | 8 ++++----
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/fb/fbblt.c b/fb/fbblt.c
index 17bd698..72a05f6 100644
--- a/fb/fbblt.c
+++ b/fb/fbblt.c
@@ -73,21 +73,21 @@ fbBlt(FbBits * srcLine,
if (alu == GXcopy && pm == FB_ALLONES && !careful &&
!(srcX & 7) && !(dstX & 7) && !(width & 7)) {
int i;
- CARD8 *src = (CARD8 *) srcLine;
- CARD8 *dst = (CARD8 *) dstLine;
+ CARD8 *tmpsrc = (CARD8 *) srcLine;
+ CARD8 *tmpdst = (CARD8 *) dstLine;
srcStride *= sizeof(FbBits);
dstStride *= sizeof(FbBits);
width >>= 3;
- src += (srcX >> 3);
- dst += (dstX >> 3);
+ tmpsrc += (srcX >> 3);
+ tmpdst += (dstX >> 3);
if (!upsidedown)
for (i = 0; i < height; i++)
- MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width);
+ MEMCPY_WRAPPED(tmpdst + i * dstStride, tmpsrc + i * srcStride, width);
else
for (i = height - 1; i >= 0; i--)
- MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width);
+ MEMCPY_WRAPPED(tmpdst + i * dstStride, tmpsrc + i * srcStride, width);
return;
}
diff --git a/fb/fbbltone.c b/fb/fbbltone.c
index eb7cf94..bfcb5a2 100644
--- a/fb/fbbltone.c
+++ b/fb/fbbltone.c
@@ -739,12 +739,12 @@ fbBltPlane(FbBits * src,
pm = fbReplicatePixel(planeMask, srcBpp);
if (srcBpp == 24) {
- int w = 24;
+ int tmpw = 24;
rot0 = FbFirst24Rot(srcX);
- if (srcX + w > FB_UNIT)
- w = FB_UNIT - srcX;
- srcMaskFirst = FbRot24(pm, rot0) & FbBitsMask(srcX, w);
+ if (srcX + tmpw > FB_UNIT)
+ tmpw = FB_UNIT - srcX;
+ srcMaskFirst = FbRot24(pm, rot0) & FbBitsMask(srcX, tmpw);
}
else {
rot0 = 0;
--
1.7.9
More information about the xorg-devel
mailing list