Commit b8ae4308 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Thomas Gleixner
Browse files

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: default avatarThomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250611-selftests-vdso-fixes-v3-4-e62e37a6bcf5@linutronix.de
parent 1c0fe1c7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ static void *vgetrandom_get_state(void)
	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);