From 9c96f4f13fe2d29165c3692479ba545bc82e9bc0 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 24 Jul 2025 14:58:33 +0200 Subject: [PATCH] lima: 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/lima/lima_bo.c: In function ‘lima_bo_cache_get’: ../src/gallium/drivers/lima/lima_bo.c:247:14: error: incompatible types when returning type ‘_Bool’ but ‘struct lima_bo *’ was expected 247 | return false; | ^~~~~ ----------------------------------------------------------------------- Reviewed-by: Faith Ekstrand Part-of: --- src/gallium/drivers/lima/lima_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/lima/lima_bo.c b/src/gallium/drivers/lima/lima_bo.c index e2daba76b69..974418cd7b4 100644 --- a/src/gallium/drivers/lima/lima_bo.c +++ b/src/gallium/drivers/lima/lima_bo.c @@ -244,7 +244,7 @@ lima_bo_cache_get(struct lima_screen *screen, uint32_t size, uint32_t flags) if (!bucket) { mtx_unlock(&screen->bo_cache_lock); - return false; + return NULL; } list_for_each_entry_safe(struct lima_bo, entry, bucket, size_list) {