diff options
author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-06-11 12:33:54 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2025-07-01 15:50:42 +0200 |
commit | b8ae430871254f95dd81dcff01828be3f6b24a57 (patch) | |
tree | 7fbf919b3ff37ff8494f9cd17f6a37836e61e983 | |
parent | 1c0fe1c7674121bcb233565bba08f7fcc2a8d5a8 (diff) |
selftests: vDSO: vdso_test_getrandom: Avoid -Wunused
vgetrandom_put_state() and the variable "ret" in kselftest() are unused.
Drop the variable "ret". Suppress the warning for vgetrandom_put_state()
as it is meant as an example for libc implementors.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-4-e62e37a6bcf5@linutronix.de
-rw-r--r-- | tools/testing/selftests/vDSO/vdso_test_getrandom.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/vDSO/vdso_test_getrandom.c b/tools/testing/selftests/vDSO/vdso_test_getrandom.c index f36e50f372f9..389ead4e1fe3 100644 --- a/tools/testing/selftests/vDSO/vdso_test_getrandom.c +++ b/tools/testing/selftests/vDSO/vdso_test_getrandom.c @@ -100,6 +100,7 @@ out: return state; } +__attribute__((unused)) /* Example for libc implementors */ static void vgetrandom_put_state(void *state) { if (!state) @@ -264,7 +265,7 @@ static void kselftest(void) } for (;;) { struct ptrace_syscall_info info = { 0 }; - int status, ret; + int status; ksft_assert(waitpid(child, &status, 0) >= 0); if (WIFEXITED(status)) { ksft_assert(WEXITSTATUS(status) == 0); |