From f194d2737b059cf6b99caa18f8ec2d46a55ada88 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 3 Oct 2009 23:08:39 +0100 Subject: [PATCH] intel: Suppress a compiler warning for an pointer->int cast MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/mesa/drivers/dri/intel/intel_pixel_read.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_pixel_read.c b/src/mesa/drivers/dri/intel/intel_pixel_read.c index bc67f6242a1..44a8695286f 100644 --- a/src/mesa/drivers/dri/intel/intel_pixel_read.c +++ b/src/mesa/drivers/dri/intel/intel_pixel_read.c @@ -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 -- 2.30.2