HomeFreeBSD

Adjust function definitions in xen's control.c to avoid clang 15 warnings

Description

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)

Details

Provenance
dimAuthored on Jul 26 2022, 12:11 PM
Parents
rG5b8fed3056b1: Fix unused variable warning in xen's blkfront.c
Branches
Unknown
Tags
Unknown