Date: Fri, 29 Jul 2022 18:48:55 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: 5bb62be305ea - stable/12 - Adjust function definitions in xen's control.c to avoid clang 15 warnings Message-ID: <202207291848.26TImtjY026005@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5bb62be305ea4e14542ac6b233147de1d90bb954 commit 5bb62be305ea4e14542ac6b233147de1d90bb954 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-07-26 12:11:09 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-07-29 18:46:02 +0000 Adjust function definitions in xen's control.c to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/dev/xen/control/control.c:188:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] xctrl_poweroff() ^ void sys/dev/xen/control/control.c:194:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] xctrl_reboot() ^ void sys/dev/xen/control/control.c:207:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] xctrl_suspend() ^ void sys/dev/xen/control/control.c:344:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] xctrl_crash() ^ void This is because xctrl_poweroff(), xctrl_reboot(), xctrl_suspend(), and xctrl_crash() 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 a6c803048fd8d4209fb1d52cd3c455a6752109b7) --- sys/dev/xen/control/control.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/xen/control/control.c b/sys/dev/xen/control/control.c index a21ccecd7373..7d99e9d6f4fe 100644 --- a/sys/dev/xen/control/control.c +++ b/sys/dev/xen/control/control.c @@ -183,19 +183,19 @@ struct xctrl_softc { /*------------------------------ Event Handlers ------------------------------*/ static void -xctrl_poweroff() +xctrl_poweroff(void) { shutdown_nice(RB_POWEROFF|RB_HALT); } static void -xctrl_reboot() +xctrl_reboot(void) { shutdown_nice(0); } static void -xctrl_suspend() +xctrl_suspend(void) { #ifdef SMP cpuset_t cpu_suspend_map; @@ -330,7 +330,7 @@ xctrl_suspend() } static void -xctrl_crash() +xctrl_crash(void) { panic("Xen directed crash"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207291848.26TImtjY026005>