[PATCH 8/9] dix: silence compiler warning comparing CARD32 to -1

Peter Hutterer peter.hutterer at who-t.net
Thu Oct 30 16:52:45 PDT 2014


window.c:3246:36: warning: comparison of constant -1 with expression of type
'CARD32' (aka 'unsigned int') is always true
[-Wtautological-constant-out-of-range-compare]
    if (optional->backingBitPlanes != ~0L)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dix/window.c b/dix/window.c
index d43ef03..9019852 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -3243,7 +3243,7 @@ CheckWindowOptionalNeed(WindowPtr w)
         return;
     if (optional->userProps != NULL)
         return;
-    if (optional->backingBitPlanes != ~0L)
+    if (optional->backingBitPlanes != (CARD32)~0L)
         return;
     if (optional->backingPixel != 0)
         return;
-- 
2.1.0



More information about the xorg-devel mailing list