Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

selftests: vDSO: quash clang omitted parameter warning in getrandom test

When building with clang, there's this warning:

vdso_test_getrandom.c:145:40: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
145 | static void *test_vdso_getrandom(void *)
| ^
vdso_test_getrandom.c:155:40: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
155 | static void *test_libc_getrandom(void *)
| ^
vdso_test_getrandom.c:165:43: warning: omitting the parameter name in a function definition is a C23 extension [-Wc23-extensions]
165 | static void *test_syscall_getrandom(void *)

Add the named ctx parameter to quash it.

Reported-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

+3 -3
+3 -3
tools/testing/selftests/vDSO/vdso_test_getrandom.c
··· 143 143 144 144 enum { TRIALS = 25000000, THREADS = 256 }; 145 145 146 - static void *test_vdso_getrandom(void *) 146 + static void *test_vdso_getrandom(void *ctx) 147 147 { 148 148 for (size_t i = 0; i < TRIALS; ++i) { 149 149 unsigned int val; ··· 153 153 return NULL; 154 154 } 155 155 156 - static void *test_libc_getrandom(void *) 156 + static void *test_libc_getrandom(void *ctx) 157 157 { 158 158 for (size_t i = 0; i < TRIALS; ++i) { 159 159 unsigned int val; ··· 163 163 return NULL; 164 164 } 165 165 166 - static void *test_syscall_getrandom(void *) 166 + static void *test_syscall_getrandom(void *ctx) 167 167 { 168 168 for (size_t i = 0; i < TRIALS; ++i) { 169 169 unsigned int val;