Skip to content

Commit b8ae430

Browse files
t-8chKAGA-KOKO
authored andcommitted
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
1 parent 1c0fe1c commit b8ae430

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/testing/selftests/vDSO/vdso_test_getrandom.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ static void *vgetrandom_get_state(void)
100100
return state;
101101
}
102102

103+
__attribute__((unused)) /* Example for libc implementors */
103104
static void vgetrandom_put_state(void *state)
104105
{
105106
if (!state)
@@ -264,7 +265,7 @@ static void kselftest(void)
264265
}
265266
for (;;) {
266267
struct ptrace_syscall_info info = { 0 };
267-
int status, ret;
268+
int status;
268269
ksft_assert(waitpid(child, &status, 0) >= 0);
269270
if (WIFEXITED(status)) {
270271
ksft_assert(WEXITSTATUS(status) == 0);

0 commit comments

Comments
 (0)