Browse Source

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

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
tags/mesa-8.0-rc1
Jeremy Huddleston 14 years ago
parent
commit
666c70ce8e
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      src/mesa/drivers/dri/r200/r200_tcl.c
  2. 2
    2
      src/mesa/drivers/dri/radeon/radeon_tcl.c

+ 2
- 2
src/mesa/drivers/dri/r200/r200_tcl.c View File

@@ -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

+ 2
- 2
src/mesa/drivers/dri/radeon/radeon_tcl.c View File

@@ -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

Loading…
Cancel
Save