lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20250611-selftests-vdso-fixes-v3-7-e62e37a6bcf5@linutronix.de>
Date: Wed, 11 Jun 2025 12:33:57 +0200
From: Thomas Weißschuh <thomas.weissschuh@...utronix.de>
To: Andy Lutomirski <luto@...nel.org>, Thomas Gleixner <tglx@...utronix.de>, 
 Vincenzo Frascino <vincenzo.frascino@....com>, 
 Shuah Khan <shuah@...nel.org>, "Jason A. Donenfeld" <Jason@...c4.com>
Cc: Shuah Khan <skhan@...uxfoundation.org>, linux-kernel@...r.kernel.org, 
 linux-kselftest@...r.kernel.org, 
 Muhammad Usama Anjum <usama.anjum@...labora.com>, 
 Thomas Weißschuh <thomas.weissschuh@...utronix.de>
Subject: [PATCH v3 7/9] 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@...utronix.de>
---
 tools/testing/selftests/vDSO/Makefile                | 2 +-
 tools/testing/selftests/vDSO/vdso_test_correctness.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/vDSO/Makefile b/tools/testing/selftests/vDSO/Makefile
index 06d72254ec75dbdcc2b20935534199fabc40a9de..918a2caa070ebc681a9525f0518afffcf10f5ae3 100644
--- a/tools/testing/selftests/vDSO/Makefile
+++ b/tools/testing/selftests/vDSO/Makefile
@@ -12,7 +12,7 @@ TEST_GEN_PROGS += vdso_test_correctness
 TEST_GEN_PROGS += vdso_test_getrandom
 TEST_GEN_PROGS += vdso_test_chacha
 
-CFLAGS := -std=gnu99 -O2 -Wall
+CFLAGS := -std=gnu99 -O2 -Wall -Wstrict-prototypes
 
 ifeq ($(CONFIG_X86_32),y)
 LDLIBS += -lgcc_s
diff --git a/tools/testing/selftests/vDSO/vdso_test_correctness.c b/tools/testing/selftests/vDSO/vdso_test_correctness.c
index 5fb97ad67eeaf17b6cfa4f82783c57894f03e5c5..da651cf53c6ca4242085de109c7fc57bd807297c 100644
--- a/tools/testing/selftests/vDSO/vdso_test_correctness.c
+++ b/tools/testing/selftests/vDSO/vdso_test_correctness.c
@@ -108,7 +108,7 @@ static void *vsyscall_getcpu(void)
 }
 
 
-static void fill_function_pointers()
+static void fill_function_pointers(void)
 {
 	void *vdso = dlopen("linux-vdso.so.1",
 			    RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);

-- 
2.49.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ