[PATCH 1/3] mioverlay.c: remove shadowed pScreen.

Dave Airlie airlied at gmail.com
Wed Aug 12 16:25:35 PDT 2015


From: Dave Airlie <airlied at redhat.com>

This is already defined at the function entry.

fixes warning:
  CC       mivaltree.lo
mioverlay.c: In function 'miOverlayWindowExposures':
mioverlay.c:993:23: warning: declaration of 'pScreen' shadows a previous local [-Wshadow]
             ScreenPtr pScreen = pWin->drawable.pScreen;
                       ^
mioverlay.c:986:15: note: shadowed declaration is here
     ScreenPtr pScreen = pWin->drawable.pScreen;

Signed-off-by: Dave Airlie <airlied at redhat.com>>
---
 mi/mioverlay.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mi/mioverlay.c b/mi/mioverlay.c
index 9f3ef07..b8b7a5b 100644
--- a/mi/mioverlay.c
+++ b/mi/mioverlay.c
@@ -990,7 +990,6 @@ miOverlayWindowExposures(WindowPtr pWin, RegionPtr prgn)
         int clientInterested =
             (pWin->eventMask | wOtherEventMasks(pWin)) & ExposureMask;
         if (clientInterested && (RegionNumRects(prgn) > RECTLIMIT)) {
-            ScreenPtr pScreen = pWin->drawable.pScreen;
             miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen);
             BoxRec box;
 
-- 
2.4.3



More information about the xorg-devel mailing list