asahi: fix returning _Bool instead of pointer
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 <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36323>
This commit is contained in:
committed by
Marge Bot
parent
c5bfa57e8f
commit
2972f1df83
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user