Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2022 08:58:19 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 1538007bb57b - stable/13 - Adjust t4_tracer_mod{load,unload}() definitions to avoid clang 15 warnings
Message-ID:  <202207230858.26N8wJ2K012656@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=1538007bb57b2dee2dbf9d2ff70cd928cc6f6be3

commit 1538007bb57b2dee2dbf9d2ff70cd928cc6f6be3
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-19 18:20:21 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-23 08:56:44 +0000

    Adjust t4_tracer_mod{load,unload}() definitions to avoid clang 15 warnings
    
    With clang 15, the following -Werror warnings are produced:
    
        sys/dev/cxgbe/t4_tracer.c:234:18: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        t4_tracer_modload()
                         ^
                          void
        sys/dev/cxgbe/t4_tracer.c:243:20: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        t4_tracer_modunload()
                           ^
                            void
    
    This is because t4_tracer_modload() and t4_tracer_modunload() are
    declared with a (void) argument list, but defined with an empty argument
    list. Make the definitions match the declarations.
    
    MFC after:      3 days
    
    (cherry picked from commit 54e5efb2643ec5f4bf40fef2a1937cd5449a58a0)
---
 sys/dev/cxgbe/t4_tracer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/cxgbe/t4_tracer.c b/sys/dev/cxgbe/t4_tracer.c
index f6c85b15c75a..c4d6f9d48fbc 100644
--- a/sys/dev/cxgbe/t4_tracer.c
+++ b/sys/dev/cxgbe/t4_tracer.c
@@ -231,7 +231,7 @@ t4_cloner_destroy(struct if_clone *ifc, struct ifnet *ifp)
 }
 
 void
-t4_tracer_modload()
+t4_tracer_modload(void)
 {
 
 	sx_init(&t4_trace_lock, "T4/T5 tracer lock");
@@ -240,7 +240,7 @@ t4_tracer_modload()
 }
 
 void
-t4_tracer_modunload()
+t4_tracer_modunload(void)
 {
 
 	if (t4_cloner != NULL) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207230858.26N8wJ2K012656>