[PATCH xquartz 07/10] dix: Silence -Wunused-variable warning by moving window.c off of legacy region defines

Jeremy Huddleston Sequoia jeremyhu at apple.com
Wed Oct 14 15:13:40 PDT 2015


window.c:223:15: warning: unused variable 'pScreen' [-Wunused-variable,Unused Entity Issue]
    ScreenPtr pScreen = pWin->drawable.pScreen;
              ^

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
---
 dix/window.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/dix/window.c b/dix/window.c
index d57f320..69b5a7c 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -220,7 +220,6 @@ log_window_info(WindowPtr pWin, int depth)
     int i;
     const char *win_name, *visibility;
     BoxPtr rects;
-    ScreenPtr pScreen = pWin->drawable.pScreen;
 
     for (i = 0; i < (depth << 2); i++)
         ErrorF(" ");
@@ -240,7 +239,7 @@ log_window_info(WindowPtr pWin, int depth)
         ErrorF(" (%s compositing: pixmap %x)",
                (pWin->redirectDraw == RedirectDrawAutomatic) ?
                "automatic" : "manual",
-               (unsigned) pScreen->GetWindowPixmap(pWin)->drawable.id);
+               (unsigned) pWin->drawable.pScreen->GetWindowPixmap(pWin)->drawable.id);
 #endif
 
     switch (pWin->visibility) {
@@ -259,10 +258,10 @@ log_window_info(WindowPtr pWin, int depth)
     }
     ErrorF(", %s", visibility);
 
-    if (REGION_NOTEMPTY(pScreen, &pWin->clipList)) {
+    if (RegionNotEmpty(&pWin->clipList)) {
         ErrorF(", clip list:");
-        rects = REGION_RECTS(&pWin->clipList);
-        for (i = 0; i < REGION_NUM_RECTS(&pWin->clipList); i++)
+        rects = RegionRects(&pWin->clipList);
+        for (i = 0; i < RegionNumRects(&pWin->clipList); i++)
             ErrorF(" [(%d, %d) to (%d, %d)]",
                    rects[i].x1, rects[i].y1, rects[i].x2, rects[i].y2);
         ErrorF("; extents [(%d, %d) to (%d, %d)]",
-- 
2.6.1



More information about the xorg-devel mailing list