[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tools: Remove the use of K&R functions


  • To: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Thu, 16 Feb 2023 23:16:36 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, "Jan Beulich" <JBeulich@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "Wei Liu" <wl@xxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Thu, 16 Feb 2023 23:16:48 +0000
  • Ironport-data: A9a23:6kIueanxRXgzzRGxyLx2zgPo5gy+JkRdPkR7XQ2eYbSJt1+Wr1Gzt xIdUT2APPyJYjH1eot2Otu3pk8HsZCGxtU1GwBurXsyFSMWpZLJC+rCIxarNUt+DCFhoGFPt JxCN4aafKjYaleG+39B55C49SEUOZmgH+a6U6icfHgqH2eIcQ954Tp7gek1n4V0ttawBgKJq LvartbWfVSowFaYCEpNg064gE4p7auaVA8w5ARkPqgR5QGGzBH5MbpETU2PByqgKmVrNrbSq 9brlNmR4m7f9hExPdKp+p6TnpoiG+O60aCm0xK6aoD66vRwjnVaPpUTbZLwXXx/mTSR9+2d/ f0W3XCGpaXFCYWX8AgVe0Ew/yiTpsSq8pefSZS0mZT7I0Er7xIAahihZa07FdRwxwp5PY1B3 eM8DHMBKRSEu/qd0ey1S+BJxcolL+C+aevzulk4pd3YJfMvQJSFSKTW/95Imjw3g6iiH96HO ZBfM2A2Kk2dPVsWYAx/5JEWxY9EglHWdTFCpU3Tjq0w+2XJlyR60aT3McqTcduPLSlQthfG+ T2Yojipav0cHJ+E4yjcz1CVvKjewzLUcpsoT+ao8OE/1TV/wURMUUZLBDNXu8KRkVWiUthSL 0gV/CsGrqUo8kGvCN7nUHWQglSJoxodUNp4CPAh5UeGza+8ywSEAmkJSBZRZdpgs9U5LRQ10 neZktWvAiZg2JWFRHTY+rqKoDeaPSkOMXREdSICVREC4dTovMc0lB2nczp4OPfr1JuvQ2i2m m3U6nFk3N3/kPLnyY2k2XSEj3WooaTRZR9r6ATeeyGr6ABQMdvNi5OT1XDX6vNJLYC8R1aHv WQZl8X20N3iHa1hhwTWHrxTQejBC+KtdWSF3AUxR8VJGyGFoSbLQGxG3N1pyK6F2O4gcCShX kLcsBg5CHR7bCrzNv8fj25c5q0XIUnc+TbNDKy8gjlmOMIZmOq7EMZGPBf44owVuBJw+ZzTw L/CGSpWMV4UCL580B29TPoH3Lkgy0gWnD2MG82klUj/geHFNBZ5rIvp13PUM4gEAF6s+l2Jo 76zyePUo/mgbAEOSnaOqtNCRbz7BXM6GYr3u6Rqmh2re2Jb9JUaI6aJm9sJItU195m5Y8+Up hlRrGcEkgug7ZAGQC3WAk1ehETHBsYk/S9hZHxxVbtqslB6CbuSAG4kX8NfVdEaGCZLl5aYk 9Ftlx28P8ly
  • Ironport-hdrordr: A9a23:qOcPBqGEe+8DYbaapLqE1ceALOsnbusQ8zAX/mt6Q3VuA6ulfq eV8MjztCWatN91YhodcL+7VpVoLUm8yXcW2/hzAV7SZmnbUQKTRekJgLcKqAeQeREWmNQtsZ tIQuxTD8DxEEg/reuS2njfLz/4+qjjzJyV
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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 offending functions.

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Anthony PERARD <anthony.perard@xxxxxxxxxx>
CC: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
CC: Julien Grall <julien@xxxxxxx>
---
 tools/debugger/gdbsx/xg/xg_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/debugger/gdbsx/xg/xg_main.c 
b/tools/debugger/gdbsx/xg/xg_main.c
index 4576c762af0c..580fe237b20e 100644
--- a/tools/debugger/gdbsx/xg/xg_main.c
+++ b/tools/debugger/gdbsx/xg/xg_main.c
@@ -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;
 
-- 
2.30.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.