Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

xen: Fix annoying compile-time warning

Commit cb6b6df111e4 ("xen/pv-on-hvm kexec: add quirk for Xen 3.4 and
shutdown watches.") added the xen_strict_xenbus_quirk() function with an
old K&R-style declaration without proper typing, causing gcc to rightly
complain:

drivers/xen/xenbus/xenbus_xs.c:628:13: warning: function declaration isn’t a prototype [-Wstrict-prototypes]

because we really don't live in caves using stone-age tools any more,
and the kernel has always used properly typed ANSI C function
declarations.

So if a function doesn't take arguments, we tell the compiler so
explicitly by adding the proper "void" in the prototype.

I'm sure there are tons of other examples of this kind of stuff in the
tree, but this is the one that hits my workstation config, so..

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+1 -1
+1 -1
drivers/xen/xenbus/xenbus_xs.c
··· 625 625 * so if we are running on anything older than 4 do not attempt to read 626 626 * control/platform-feature-xs_reset_watches. 627 627 */ 628 - static bool xen_strict_xenbus_quirk() 628 + static bool xen_strict_xenbus_quirk(void) 629 629 { 630 630 uint32_t eax, ebx, ecx, edx, base; 631 631