From 6e2de272888621b4242fccebf83e0b54d9938b48 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Wed, 23 Jul 2025 09:51:22 +0200 Subject: [PATCH] zink: fix returning _Bool instead of pointer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building for C23 the compiler warns about returning a boolean when a different type is expected instead. Change the code to return NULL instead of false, fixing the following error: ----------------------------------------------------------------------- src/gallium/drivers/zink/zink_instance.c: In function ‘zink_create_instance’: src/gallium/drivers/zink/zink_instance.c:37:14: error: incompatible types when returning type ‘_Bool’ but ‘VkInstance’ {aka ‘struct VkInstance_T *’} was expected 37 | return false; | ^~~~~ ----------------------------------------------------------------------- Reviewed-by: Faith Ekstrand Part-of: --- src/gallium/drivers/zink/zink_instance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 src/gallium/drivers/zink/zink_instance.py diff --git a/src/gallium/drivers/zink/zink_instance.py b/src/gallium/drivers/zink/zink_instance.py old mode 100644 new mode 100755 index 1ab36bee2ca..9de653ab820 --- a/src/gallium/drivers/zink/zink_instance.py +++ b/src/gallium/drivers/zink/zink_instance.py @@ -154,7 +154,7 @@ zink_create_instance(struct zink_screen *screen, struct zink_instance_info *inst GET_PROC_ADDR_INSTANCE_LOCAL(screen, NULL, EnumerateInstanceLayerProperties); if (!vk_EnumerateInstanceExtensionProperties || !vk_EnumerateInstanceLayerProperties) - return false; + return NULL; // Build up the extensions from the reported ones but only for the unnamed layer uint32_t extension_count = 0;