nak: 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/nouveau/compiler/nak_nir_lower_image_addrs.c: In function ‘lower_formatted_image_load’:
../src/nouveau/compiler/nak_nir_lower_image_addrs.c:60:14: error: incompatible types when returning type ‘_Bool’ but ‘nir_def *’ {aka ‘struct nir_def *’} was expected
   60 |       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:
Antonio Ospite
2025-07-23 10:43:55 +02:00
committed by Marge Bot
parent 6ffe6c2aef
commit bf56ab91fd
@@ -57,7 +57,7 @@ lower_formatted_image_load(nir_builder *b,
enum pipe_format format)
{
if (format == PIPE_FORMAT_NONE)
return false;
return NULL;
unsigned bits = util_format_get_blocksizebits(format);