[Mesa-dev] [PATCH 1/6] st/draw: silence Mingw warning in pointer_to_offset()
Brian Paul
brianp at vmware.com
Tue Oct 29 21:11:45 CET 2013
Fixes "warning: cast from pointer to integer of different size" for
64-bit builds.
---
src/mesa/state_tracker/st_draw.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h
index 3313fc8..394473b 100644
--- a/src/mesa/state_tracker/st_draw.h
+++ b/src/mesa/state_tracker/st_draw.h
@@ -77,7 +77,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
static INLINE unsigned
pointer_to_offset(const void *ptr)
{
- return (unsigned) (((unsigned long) ptr) & 0xffffffffUL);
+ return (unsigned) (((GLsizeiptr) ptr) & 0xffffffffUL);
}
--
1.7.10.4
More information about the mesa-dev
mailing list