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
This commit is contained in:
Dimitry Andric 2022-07-26 14:11:09 +02:00
parent 39e12a7591
commit a6c803048f

View File

@ -185,26 +185,26 @@ 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);
}
#if !defined(__amd64__) && !defined(__i386__)
static void
xctrl_suspend()
xctrl_suspend(void)
{
printf("WARNING: xen/control: Suspend not supported!\n");
}
#else /* __amd64__ || __i386__ */
static void
xctrl_suspend()
xctrl_suspend(void)
{
#ifdef SMP
cpuset_t cpu_suspend_map;
@ -341,7 +341,7 @@ xctrl_suspend()
#endif /* __amd64__ || __i386__ */
static void
xctrl_crash()
xctrl_crash(void)
{
panic("Xen directed crash");
}