Skip to content

Commit 58265d6

Browse files
t-8chKAGA-KOKO
authored andcommitted
selftests: vDSO: vdso_test_correctness: Fix -Wstrict-prototypes
Functions definitions without any argument list produce a warning with -Wstrict-prototypes: vdso_test_correctness.c:111:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 111 | static void fill_function_pointers() | ^~~~~~~~~~~~~~~~~~~~~~ Explicitly use an empty argument list. Now that all selftests a free of this warning, enable it in the Makefile. 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-7-e62e37a6bcf5@linutronix.de
1 parent 8863cd7 commit 58265d6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tools/testing/selftests/vDSO/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ TEST_GEN_PROGS += vdso_test_correctness
1212
TEST_GEN_PROGS += vdso_test_getrandom
1313
TEST_GEN_PROGS += vdso_test_chacha
1414

15-
CFLAGS := -std=gnu99 -O2 -Wall
15+
CFLAGS := -std=gnu99 -O2 -Wall -Wstrict-prototypes
1616

1717
ifeq ($(CONFIG_X86_32),y)
1818
LDLIBS += -lgcc_s

tools/testing/selftests/vDSO/vdso_test_correctness.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ static void *vsyscall_getcpu(void)
108108
}
109109

110110

111-
static void fill_function_pointers()
111+
static void fill_function_pointers(void)
112112
{
113113
void *vdso = dlopen("linux-vdso.so.1",
114114
RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);

0 commit comments

Comments
 (0)