mesa/src/compiler/clc
Vinson Lee 85fd63068e compiler/clc: Fix const correctness in libclc_add_generic_variants
Fix compiler error:

../src/compiler/clc/nir_load_libclc.c:266:13: error: initializing
'char *' with an expression of type 'const char *' discards qualifiers
[-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  266 |       char *U3AS1 = strstr(func->name, "U3AS1");
      |             ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~

glibc now provides C23-style type-generic string functions. strstr
returns const char * when passed a const char * argument. Update U3AS1
declaration to const since it's only used for offset calculation.

Fixes: 4a08ee7ecf ("spirv/libclc: Add generic versions of arithmetic functions")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39761>
2026-02-08 22:48:13 +00:00
..
clc.c clc: Tell clang to track imported dependencies 2024-12-06 13:48:26 -05:00
clc.h clc: support some atomic and generic address space features 2026-01-30 16:06:25 +00:00
clc_helpers.cpp clc: fix compile compatability with LLVM-22 2026-01-30 16:06:26 +00:00
clc_helpers.h rusticl/feat: LinkOnce ODR 2025-01-31 13:46:41 +00:00
mesa_clc.c clc: enable generic address space and seq_cst and device scope atomic features 2026-01-30 16:06:25 +00:00
meson.build mesa-clc: add an option to force inclusion of OpenCL headers 2025-04-24 11:40:15 +00:00
nir_clc_helpers.h nir: move the libclc lowering over to functions file. 2023-09-12 01:57:50 +00:00
nir_load_libclc.c compiler/clc: Fix const correctness in libclc_add_generic_variants 2026-02-08 22:48:13 +00:00