Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jul 2022 08:59:01 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: e5793e6e7fd9 - stable/12 - Adjust t4_tracer_mod{load,unload}() definitions to avoid clang 15 warnings
Message-ID:  <202207230859.26N8x1sq013341@gitrepo.freebsd.org>

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

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

commit e5793e6e7fd9736662d0f073a0ca108bc3e4c751
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:57:43 +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 035c7b029d8f..ac85e6c4f653 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?202207230859.26N8x1sq013341>