summaryrefslogtreecommitdiffstats
path: root/src/vulkan/wsi
diff options
context:
space:
mode:
authorKai Wasserbäch <[email protected]>2018-08-17 16:32:33 +0200
committerTimothy Arceri <[email protected]>2018-08-18 10:34:19 +1000
commit2c020dbf063b55d96b1e799fb8dd6ec335b84c33 (patch)
tree5979b03f53c26728b1c55e537dab180c6b213486 /src/vulkan/wsi
parent6f0647c0b207cfe0805eb899c2d97703ae00b1e7 (diff)
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 <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/vulkan/wsi')
-rw-r--r--src/vulkan/wsi/wsi_common_x11.c2
1 files changed, 1 insertions, 1 deletions
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) {