Mesa (master): r300g: Cast rbuf->user_buffer to 'uint8_t *' before arithmetic.

Vinson Lee vlee at kemper.freedesktop.org
Sun Apr 18 05:45:26 UTC 2010


Module: Mesa
Branch: master
Commit: 0268e8984cfee9dca38ec5e74af7a562377bf53a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0268e8984cfee9dca38ec5e74af7a562377bf53a

Author: Vinson Lee <vlee at vmware.com>
Date:   Sat Apr 17 22:42:03 2010 -0700

r300g: Cast rbuf->user_buffer to 'uint8_t *' before arithmetic.

Fixes this SCons build error.
"pointer of type 'void *' uses in arithmetic"

---

 src/gallium/drivers/r300/r300_screen_buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c
index ea10aee..739f723 100644
--- a/src/gallium/drivers/r300/r300_screen_buffer.c
+++ b/src/gallium/drivers/r300/r300_screen_buffer.c
@@ -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;




More information about the mesa-commit mailing list