From 2972f1df834c9ec2d69d9c1de11d684d8ec0db6d Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 24 Jul 2025 14:50:10 +0200 Subject: [PATCH] asahi: 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/asahi/agx_pipe.c: In function ‘agx_resource_from_handle’: ../src/gallium/drivers/asahi/agx_pipe.c:184:14: error: incompatible types when returning type ‘_Bool’ but ‘struct pipe_resource *’ was expected 184 | return false; | ^~~~~ ----------------------------------------------------------------------- Reviewed-by: Faith Ekstrand Part-of: --- src/gallium/drivers/asahi/agx_pipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 4192ca88e61..9233456ce03 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -181,7 +181,7 @@ agx_resource_from_handle(struct pipe_screen *pscreen, */ if (rsc->modifier == DRM_FORMAT_MOD_LINEAR && (whandle->stride % 16) != 0) { FREE(rsc); - return false; + return NULL; } prsc = &rsc->base;