[PATCH:libXrender] Make DEPTH_MASK generate unsigned ints
Alan Coopersmith
alan.coopersmith at oracle.com
Sun May 22 12:51:48 PDT 2011
Clears Sun compiler warning:
"Xrender.c", line 127: warning: integer overflow detected: op "<<"
since 1 << 31 overflows a signed 32-bit int.
Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
src/Xrender.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/Xrender.c b/src/Xrender.c
index c763076..fce16ab 100644
--- a/src/Xrender.c
+++ b/src/Xrender.c
@@ -70,7 +70,7 @@ XRenderExtFindDisplay (XRenderExtInfo *extinfo,
* any screen, tell the application that Render is not present.
*/
-#define DEPTH_MASK(d) (1 << ((d) - 1))
+#define DEPTH_MASK(d) (1U << ((d) - 1))
/*
* Render requires support for depth 1, 4, 8, 24 and 32 pixmaps
--
1.7.3.2
More information about the xorg-devel
mailing list