]> xenbits.xensource.com Git - xen.git/commitdiff
tools: Remove the use of K&R functions
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 16 Feb 2023 22:47:50 +0000 (22:47 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 17 Feb 2023 11:01:54 +0000 (11:01 +0000)
Clang-15 (as seen in the FreeBSD 14 tests) complains:

  xg_main.c:1248 error: a function declaration without a
  prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  xg_init()
         ^
          void

The error message is a bit confusing but appears to new as part of
-Wdeprecated-non-prototype which is part of supporting C2x which formally
removes K&R syntax.

Either way, fix the identified function.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
tools/debugger/gdbsx/xg/xg_main.c

index 4576c762af0c29521e75db5ba3355d89250a0047..580fe237b20e9f8d0b27bae630a95621c2038690 100644 (file)
@@ -121,7 +121,7 @@ xgprt(const char *fn, const char *fmt, ...)
  *         -1 failure, errno set.
  */
 int 
-xg_init()
+xg_init(void)
 {
     int flags, saved_errno;