Mesa (gallium-resources): util: Fix type cast.

Michał Król michal at kemper.freedesktop.org
Fri Apr 9 16:08:27 UTC 2010


Module: Mesa
Branch: gallium-resources
Commit: 7c8763aa6cfc74adf1ea49c2bab25ca17b32575f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c8763aa6cfc74adf1ea49c2bab25ca17b32575f

Author: unknown <michal at .(none)>
Date:   Fri Apr  9 18:05:20 2010 +0200

util: Fix type cast.

---

 src/gallium/auxiliary/util/u_inlines.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_inlines.h b/src/gallium/auxiliary/util/u_inlines.h
index f9cd4e1..c2f4f05 100644
--- a/src/gallium/auxiliary/util/u_inlines.h
+++ b/src/gallium/auxiliary/util/u_inlines.h
@@ -161,7 +161,7 @@ pipe_buffer_map_range(struct pipe_context *pipe,
 		      struct pipe_transfer **transfer)
 {
    struct pipe_box box;
-   char *map;
+   void *map;
 
    assert(offset < buffer->width0);
    assert(offset + length <= buffer->width0);
@@ -187,7 +187,7 @@ pipe_buffer_map_range(struct pipe_context *pipe,
    /* Match old screen->buffer_map_range() behaviour, return pointer
     * to where the beginning of the buffer would be:
     */
-   return (void *)(map - offset);
+   return (void *)((char *)map - offset);
 }
 
 




More information about the mesa-commit mailing list