[PATCH 10/18] exa: Fix -Wshadow warnings

Keith Packard keithp at keithp.com
Mon Jan 13 10:17:50 PST 2014


In exa_accel, there was a duplicate fetch of a pixmap private field.

exa_render just had a regular shadowed value.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 exa/exa_accel.c  | 1 -
 exa/exa_render.c | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 0e948f4..9c742bd 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -1039,7 +1039,6 @@ exaFillRegionSolid(DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
             pExaPixmap->sys_ptr && pDrawable->type == DRAWABLE_PIXMAP &&
             pDrawable->width == 1 && pDrawable->height == 1 &&
             pDrawable->bitsPerPixel != 24) {
-            ExaPixmapPriv(pPixmap);
             RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
 
             switch (pDrawable->bitsPerPixel) {
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 172e2b5..c4edf40 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -915,7 +915,7 @@ exaComposite(CARD8 op,
             if (!pSrc->repeat && xSrc >= 0 && ySrc >= 0 &&
                 (xSrc + width <= pSrc->pDrawable->width) &&
                 (ySrc + height <= pSrc->pDrawable->height)) {
-                Bool ret;
+                Bool suc;
 
                 xDst += pDst->pDrawable->x;
                 yDst += pDst->pDrawable->y;
@@ -927,7 +927,7 @@ exaComposite(CARD8 op,
                                               yDst, width, height))
                     goto done;
 
-                ret = exaHWCopyNtoN(pSrc->pDrawable, pDst->pDrawable, NULL,
+                suc = exaHWCopyNtoN(pSrc->pDrawable, pDst->pDrawable, NULL,
                                     RegionRects(&region),
                                     RegionNumRects(&region), xSrc - xDst,
                                     ySrc - yDst, FALSE, FALSE);
@@ -939,7 +939,7 @@ exaComposite(CARD8 op,
                 xSrc -= pSrc->pDrawable->x;
                 ySrc -= pSrc->pDrawable->y;
 
-                if (!ret)
+                if (!suc)
                     goto fallback;
 
                 goto done;
-- 
1.8.5.2



More information about the xorg-devel mailing list