]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Adjust function definitions in xen's control.c to avoid clang 15 warnings
authorDimitry Andric <dim@FreeBSD.org>
Tue, 26 Jul 2022 12:11:09 +0000 (14:11 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Tue, 26 Jul 2022 17:59:55 +0000 (19:59 +0200)
commita6c803048fd8d4209fb1d52cd3c455a6752109b7
tree5692369db480c837f7bedf949d297e2a81fc847e
parent39e12a7591bf2ed4b2fae48e19f3af3a3cdcb196
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
sys/dev/xen/control/control.c