Module: Mesa
Branch: master
Commit: 666c70ce8eb7c8a21536f03be3a68a3c11997e09
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=666c70ce8eb7c8a21536f03be3a68a3c11997e09

Author: Jeremy Huddleston <[email protected]>
Date:   Tue Nov  1 21:04:34 2011 -0700

Build fix for -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast

Signed-off-by: Jeremy Huddleston <[email protected]>

---

 src/mesa/drivers/dri/r200/r200_tcl.c     |    4 ++--
 src/mesa/drivers/dri/radeon/radeon_tcl.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/drivers/dri/r200/r200_tcl.c 
b/src/mesa/drivers/dri/r200/r200_tcl.c
index 48563dd..3ece7a3 100644
--- a/src/mesa/drivers/dri/r200/r200_tcl.c
+++ b/src/mesa/drivers/dri/r200/r200_tcl.c
@@ -218,8 +218,8 @@ static void r200EmitPrim( struct gl_context *ctx,
 #ifdef MESA_BIG_ENDIAN
 /* We could do without (most of) this ugliness if dest was always 32 bit word 
aligned... */
 #define EMIT_ELT(dest, offset, x) do {                          \
-        int off = offset + ( ( (GLuint)dest & 0x2 ) >> 1 );     \
-        GLushort *des = (GLushort *)( (GLuint)dest & ~0x2 );    \
+        int off = offset + ( ( (uintptr_t)dest & 0x2 ) >> 1 );     \
+        GLushort *des = (GLushort *)( (uintptr_t)dest & ~0x2 );    \
         (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x);    \
        (void)rmesa; } while (0)
 #else
diff --git a/src/mesa/drivers/dri/radeon/radeon_tcl.c 
b/src/mesa/drivers/dri/radeon/radeon_tcl.c
index 5d2e8f4..874ba92 100644
--- a/src/mesa/drivers/dri/radeon/radeon_tcl.c
+++ b/src/mesa/drivers/dri/radeon/radeon_tcl.c
@@ -207,8 +207,8 @@ static void radeonEmitPrim( struct gl_context *ctx,
 #ifdef MESA_BIG_ENDIAN
 /* We could do without (most of) this ugliness if dest was always 32 bit word 
aligned... */
 #define EMIT_ELT(dest, offset, x) do {                         \
-       int off = offset + ( ( (GLuint)dest & 0x2 ) >> 1 );     \
-       GLushort *des = (GLushort *)( (GLuint)dest & ~0x2 );    \
+       int off = offset + ( ( (uintptr_t)dest & 0x2 ) >> 1 );  \
+       GLushort *des = (GLushort *)( (uintptr_t)dest & ~0x2 ); \
        (des)[ off + 1 - 2 * ( off & 1 ) ] = (GLushort)(x);     \
        (void)rmesa; } while (0)
 #else

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to