From: Michal Krol Date: Tue, 15 Sep 2009 11:00:27 +0000 (+0100) Subject: gallium: Fix pointer type casts. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7aee53002c25369364f5d26aeb63d6c467f77c49;p=mesa.git gallium: Fix pointer type casts. --- diff --git a/src/gallium/include/pipe/p_inlines.h b/src/gallium/include/pipe/p_inlines.h index 4f0a7a4ef63..aa757e7bda1 100644 --- a/src/gallium/include/pipe/p_inlines.h +++ b/src/gallium/include/pipe/p_inlines.h @@ -118,7 +118,7 @@ pipe_buffer_write(struct pipe_screen *screen, unsigned offset, unsigned size, const void *data) { - uint8_t *map; + void *map; assert(offset < buf->size); assert(offset + size <= buf->size); @@ -129,7 +129,7 @@ pipe_buffer_write(struct pipe_screen *screen, PIPE_BUFFER_USAGE_FLUSH_EXPLICIT); assert(map); if(map) { - memcpy(map + offset, data, size); + memcpy((uint8_t *)map + offset, data, size); pipe_buffer_flush_mapped_range(screen, buf, offset, size); pipe_buffer_unmap(screen, buf); } @@ -141,7 +141,7 @@ pipe_buffer_read(struct pipe_screen *screen, unsigned offset, unsigned size, void *data) { - uint8_t *map; + void *map; assert(offset < buf->size); assert(offset + size <= buf->size); @@ -150,7 +150,7 @@ pipe_buffer_read(struct pipe_screen *screen, map = pipe_buffer_map_range(screen, buf, offset, size, PIPE_BUFFER_USAGE_CPU_READ); assert(map); if(map) { - memcpy(data, map + offset, size); + memcpy(data, (const uint8_t *)map + offset, size); pipe_buffer_unmap(screen, buf); } }