From 2c020dbf063b55d96b1e799fb8dd6ec335b84c33 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kai=20Wasserb=C3=A4ch?= Date: Fri, 17 Aug 2018 16:32:33 +0200 Subject: [PATCH] vulkan/wsi: initialise image_index to 0 in x11_manage_fifo_queues MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/vulkan/wsi/wsi_common_x11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.30.2