From: Kai Wasserbäch Date: Fri, 17 Aug 2018 14:32:33 +0000 (+0200) Subject: vulkan/wsi: initialise image_index to 0 in x11_manage_fifo_queues X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c020dbf063b55d96b1e799fb8dd6ec335b84c33;p=mesa.git vulkan/wsi: initialise image_index to 0 in x11_manage_fifo_queues Supresses a maybe-uninitialized warning with GCC 8. Note: image_index should always be initialised due to the result check, but the compiler doesn't see that. Signed-off-by: Kai Wasserbäch Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c index 7e7b3a94e4b..7b930884b47 100644 --- a/src/vulkan/wsi/wsi_common_x11.c +++ b/src/vulkan/wsi/wsi_common_x11.c @@ -991,7 +991,7 @@ x11_manage_fifo_queues(void *state) * before that point so the client should be able to acquire any image * other than the currently presented one. */ - uint32_t image_index; + uint32_t image_index = 0; result = wsi_queue_pull(&chain->present_queue, &image_index, INT64_MAX); assert(result != VK_TIMEOUT); if (result < 0) {