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

[xen stable-4.17] tools: Remove the use of K&R functions



commit ec4cf867d1fe6e0613b2504ea636199316b464a9
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Jul 21 08:23:19 2023 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Fri Jul 21 08:23:19 2023 +0200

    tools: Remove the use of K&R functions
    
    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@xxxxxxxxxx>
    Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
    master commit: e2312e41f05c0f2e3b714710bd2551a3cd74cedd
    master date: 2023-02-17 11:01:54 +0000
---
 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 4576c762af..580fe237b2 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;
 
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.17



 


Rackspace

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