st/draw: silence Mingw warning in pointer_to_offset()
authorBrian Paul <brianp@vmware.com>
Tue, 29 Oct 2013 15:48:32 +0000 (09:48 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 31 Oct 2013 14:21:58 +0000 (08:21 -0600)
Fixes "warning: cast from pointer to integer of different size" for
64-bit builds.

src/mesa/state_tracker/st_draw.h

index 3313fc8..394473b 100644 (file)
@@ -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);
 }