Re: [PATCH 3/7] selftests: vDSO: vdso_test_correctness: Fix -Wold-style-definitions

From: Muhammad Usama Anjum
Date: Fri May 02 2025 - 09:45:06 EST


On 5/2/25 5:40 PM, Thomas Weißschuh wrote:
> Functions definitions without any argument list produce a warning with
> -Wold-style-definition:
>
> vdso_test_correctness.c:111:13: warning: old-style function definition [-Wold-style-definition]
> 111 | static void fill_function_pointers()
> | ^~~~~~~~~~~~~~~~~~~~~~
This warning doesn't appear on my side. Are you using extra compiler
flags? If yes, please add them to the Makefile.

>
> Explicitly use an empty argument list.
>
> Signed-off-by: Thomas Weißschuh <thomas.weissschuh@xxxxxxxxxxxxx>
> ---
> tools/testing/selftests/vDSO/vdso_test_correctness.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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);
>


--
Regards,
Usama