r300g: Cast rbuf->user_buffer to 'uint8_t *' before arithmetic.
authorVinson Lee <vlee@vmware.com>
Sun, 18 Apr 2010 05:42:03 +0000 (22:42 -0700)
committerVinson Lee <vlee@vmware.com>
Sun, 18 Apr 2010 05:44:35 +0000 (22:44 -0700)
Fixes this SCons build error.
"pointer of type 'void *' uses in arithmetic"

src/gallium/drivers/r300/r300_screen_buffer.c

index ea10aeee24e92cbea126ef9c622dc9fea6fd886a..739f723f163ebe63bb1f595a93c5610820eeb43c 100644 (file)
@@ -156,7 +156,7 @@ r300_buffer_transfer_map( struct pipe_context *pipe,
     unsigned i;
 
     if (rbuf->user_buffer)
-        return rbuf->user_buffer + transfer->box.x;
+        return (uint8_t *) rbuf->user_buffer + transfer->box.x;
 
     if (rbuf->b.b.bind & PIPE_BIND_CONSTANT_BUFFER) {
        goto just_map;