diff options
author | Chad Versace <[email protected]> | 2014-11-18 21:11:23 -0800 |
---|---|---|
committer | Chad Versace <[email protected]> | 2014-12-22 15:46:54 -0600 |
commit | d11bc9fe8daf097741713cde6bdd79e1f0e0e8fc (patch) | |
tree | 3b0f6c2bfbfdf97ad2c83320e0d4d26f17389332 /src/mesa/drivers | |
parent | 2150db4d5daad3781876254d2b440367afd756cd (diff) |
i965: Remove spurious casts in copy_image_with_memcpy()
If a pointer points to raw, untyped memory and is never dereferenced,
then declare it as 'void*' instead of casting it to 'void*'.
Signed-off-by: Chad Versace <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_copy_image.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_copy_image.c b/src/mesa/drivers/dri/i965/intel_copy_image.c index 341220cff88..cb44474a31c 100644 --- a/src/mesa/drivers/dri/i965/intel_copy_image.c +++ b/src/mesa/drivers/dri/i965/intel_copy_image.c @@ -144,7 +144,7 @@ copy_image_with_memcpy(struct brw_context *brw, int src_width, int src_height) { bool same_slice; - uint8_t *mapped, *src_mapped, *dst_mapped; + void *mapped, *src_mapped, *dst_mapped; int src_stride, dst_stride, i, cpp; int map_x1, map_y1, map_x2, map_y2; GLuint src_bw, src_bh; @@ -176,7 +176,7 @@ copy_image_with_memcpy(struct brw_context *brw, intel_miptree_map(brw, src_mt, src_level, src_z, map_x1, map_y1, map_x2 - map_x1, map_y2 - map_y1, GL_MAP_READ_BIT | GL_MAP_WRITE_BIT, - (void **)&mapped, &src_stride); + &mapped, &src_stride); dst_stride = src_stride; @@ -188,10 +188,10 @@ copy_image_with_memcpy(struct brw_context *brw, } else { intel_miptree_map(brw, src_mt, src_level, src_z, src_x, src_y, src_width, src_height, - GL_MAP_READ_BIT, (void **)&src_mapped, &src_stride); + GL_MAP_READ_BIT, &src_mapped, &src_stride); intel_miptree_map(brw, dst_mt, dst_level, dst_z, dst_x, dst_y, src_width, src_height, - GL_MAP_WRITE_BIT, (void **)&dst_mapped, &dst_stride); + GL_MAP_WRITE_BIT, &dst_mapped, &dst_stride); } src_width /= (int)src_bw; |