linux/tools/testing
John Hubbard 4bf15b1c65 selftests/futex: don't pass a const char* to asprintf(3)
When building with clang, via:

    make LLVM=1 -C tools/testing/selftests

...clang issues this warning:

futex_requeue_pi.c:403:17: warning: passing 'const char **' to parameter
of type 'char **' discards qualifiers in nested pointer types
[-Wincompatible-pointer-types-discards-qualifiers]

This warning fires because test_name is passed into asprintf(3), which
then changes it.

Fix this by simply removing the const qualifier. This is a local
automatic variable in a very short function, so there is not much need
to use the compiler to enforce const-ness at this scope.

[1] https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c49f@valentinobst.de/

Fixes: f17d8a87ec ("selftests: fuxex: Report a unique test name per run of futex_requeue_pi")
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2024-05-31 14:37:10 -06:00
..
crypto/chacha20-s390
cxl CXL changes for v6.10 merge window 2024-05-15 14:32:27 -07:00
fault-injection
ktest ktest: force $buildonly = 1 for 'make_warnings_file' test type 2024-03-15 12:36:19 -04:00
kunit RISC-V SoC Kconfig Updates for v6.10 2024-05-07 11:02:56 +02:00
memblock
nvdimm ndtest: Convert to platform remove callback returning void 2024-04-25 12:37:12 -07:00
radix-tree tools: fix userspace compilation with new test_xarray changes 2024-05-05 17:28:05 -07:00
scatterlist
selftests selftests/futex: don't pass a const char* to asprintf(3) 2024-05-31 14:37:10 -06:00
vsock