mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-02 15:20:26 +01:00
etnaviv: 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/etnaviv/etnaviv_query_acc_perfmon.c: In function ‘perfmon_allocate’:
../src/gallium/drivers/etnaviv/etnaviv_query_acc_perfmon.c:109:14: error: incompatible types when returning type ‘_Bool’ but ‘struct etna_acc_query *’ was expected
109 | return false;
| ^~~~~
../src/gallium/drivers/etnaviv/etnaviv_query_acc_perfmon.c:112:14: error: incompatible types when returning type ‘_Bool’ but ‘struct etna_acc_query *’ was expected
112 | 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:
parent
2972f1df83
commit
b2b6e56583
1 changed files with 2 additions and 2 deletions
|
|
@ -106,10 +106,10 @@ perfmon_allocate(struct etna_context *ctx, unsigned query_type)
|
|||
|
||||
cfg = etna_pm_query_config(query_type);
|
||||
if (!cfg)
|
||||
return false;
|
||||
return NULL;
|
||||
|
||||
if (!etna_pm_cfg_supported(ctx->screen->perfmon, cfg))
|
||||
return false;
|
||||
return NULL;
|
||||
|
||||
pq = CALLOC_STRUCT(etna_pm_query);
|
||||
if (!pq)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue