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:
|
||
---|---|---|
.. | ||
.gitignore | ||
futex_requeue.c | ||
futex_requeue_pi.c | ||
futex_requeue_pi_mismatched_ops.c | ||
futex_requeue_pi_signal_restart.c | ||
futex_wait.c | ||
futex_wait_private_mapped_file.c | ||
futex_wait_timeout.c | ||
futex_wait_uninitialized_heap.c | ||
futex_wait_wouldblock.c | ||
futex_waitv.c | ||
Makefile | ||
run.sh |