Date: Wed, 27 Jul 2022 19:18:07 GMT From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: aad14bc54d92 - stable/13 - Adjust linux_vdso_{cpu,tsc}_selector_idx() definitions to avoid clang 15 warnings Message-ID: <202207271918.26RJI7NN058779@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=aad14bc54d92394fd648306705d52f8639bfafff commit aad14bc54d92394fd648306705d52f8639bfafff Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-24 21:53:22 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-27 19:17:22 +0000 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 (cherry picked from commit eadef926b0593f18beb225f46b3d8a8d4fb44c8e) --- sys/x86/linux/linux_vdso_selector_x86.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/x86/linux/linux_vdso_selector_x86.c b/sys/x86/linux/linux_vdso_selector_x86.c index bd8ae333801b..93da98420f17 100644 --- a/sys/x86/linux/linux_vdso_selector_x86.c +++ b/sys/x86/linux/linux_vdso_selector_x86.c @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207271918.26RJI7NN058779>