Adjust linux_vdso_{cpu,tsc}_selector_idx() definitions to avoid clang 15 warnings

With clang 15, the following -Werror warnings are produced:

    sys/x86/linux/linux_vdso_selector_x86.c:44:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    linux_vdso_tsc_selector_idx()
                               ^
                                void
    sys/x86/linux/linux_vdso_selector_x86.c:62:28: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    linux_vdso_cpu_selector_idx()
                               ^
                                void

This is because linux_vdso_tsc_selector_idx() and
linux_vdso_cpu_selector_idx are declared with (void) argument lists, but
defined with empty argument lists. Make the definitions match the
declarations.

MFC after:	3 days
This commit is contained in:
Dimitry Andric 2022-07-24 23:53:22 +02:00
parent e90d1b5748
commit eadef926b0

View File

@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$");
#include <x86/linux/linux_x86.h>
int
linux_vdso_tsc_selector_idx()
linux_vdso_tsc_selector_idx(void)
{
bool amd_cpu;
@ -59,7 +59,7 @@ linux_vdso_tsc_selector_idx()
}
int
linux_vdso_cpu_selector_idx()
linux_vdso_cpu_selector_idx(void)
{
if ((cpu_stdext_feature2 & CPUID_STDEXT2_RDPID) != 0)