intel: Suppress a compiler warning for an pointer->int cast
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 3 Oct 2009 22:08:39 +0000 (23:08 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Sat, 3 Oct 2009 22:08:39 +0000 (23:08 +0100)
intel_pixel_read.c: In function ‘do_blit_readpixels’:
intel_pixel_read.c:221: warning: cast from pointer to integer of
different size

Cast via an intermediate (GLintptr) instead and hope the result fits
within GLuint... [It should as we simply do not support textures *that*
large!]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
src/mesa/drivers/dri/intel/intel_pixel_read.c

index bc67f6242a192a3828eb114b643c800052989635..44a8695286f202d67a9b52c94f5edd07fb841833 100644 (file)
@@ -216,9 +216,8 @@ do_blit_readpixels(GLcontext * ctx,
       rowLength = -rowLength;
    }
 
-   /* XXX 64-bit cast? */
-   dst_offset = (GLuint) _mesa_image_address(2, pack, pixels, width, height,
-                                             format, type, 0, 0, 0);
+   dst_offset = (GLintptr) _mesa_image_address(2, pack, pixels, width, height,
+                                              format, type, 0, 0, 0);
 
 
    /* Although the blits go on the command buffer, need to do this and