[Xcb] [PATCH:util-renderutil] Mark DEPTH_MASK as Unsigned int

Alan Coopersmith alan.coopersmith at oracle.com
Sat Oct 1 08:30:18 PDT 2011


Clears Sun compiler warnings from trying to shift a signed int by 32 bits:
"cache.c", line 103: warning: integer overflow detected: op "<<"
"cache.c", line 103: warning: initializer will be sign-extended: -2139094903

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 renderutil/cache.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/renderutil/cache.c b/renderutil/cache.c
index 96acbe8..c04fb50 100644
--- a/renderutil/cache.c
+++ b/renderutil/cache.c
@@ -48,7 +48,7 @@ static struct {
  * 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 Xcb mailing list