From: Samuel Pitoiset Date: Thu, 31 Oct 2019 15:10:23 +0000 (+0100) Subject: radv: fix 32-bit compiler warnings X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0b3bd1a7c2d721de00670a69c1b7847b6c2214e8;p=mesa.git radv: fix 32-bit compiler warnings Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2031 Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c index 68d361f41dd..b8f74036fc6 100644 --- a/src/amd/vulkan/radv_debug.c +++ b/src/amd/vulkan/radv_debug.c @@ -248,7 +248,7 @@ radv_dump_descriptors(struct radv_device *device, FILE *f) fprintf(f, "Descriptors:\n"); for (i = 0; i < MAX_SETS; i++) { struct radv_descriptor_set *set = - (struct radv_descriptor_set *)ptr[i + 3]; + *(struct radv_descriptor_set **)(ptr + i + 3); radv_dump_descriptor_set(device, set, i, f); } @@ -497,7 +497,7 @@ radv_get_saved_graphics_pipeline(struct radv_device *device) { uint64_t *ptr = (uint64_t *)device->trace_id_ptr; - return (struct radv_pipeline *)ptr[1]; + return *(struct radv_pipeline **)(ptr + 1); } static struct radv_pipeline * @@ -505,7 +505,7 @@ radv_get_saved_compute_pipeline(struct radv_device *device) { uint64_t *ptr = (uint64_t *)device->trace_id_ptr; - return (struct radv_pipeline *)ptr[2]; + return *(struct radv_pipeline **)(ptr + 2); } static void