Source-Changes-HG archive

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

[src/trunk]: src/sys/net/lagg if_lagg: fix Clang build



details:   https://anonhg.NetBSD.org/src/rev/65403177ffcd
branches:  trunk
changeset: 379209:65403177ffcd
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed May 19 06:13:08 2021 +0000

description:
if_lagg: fix Clang build

Clang is stricter than GCC when it comes to nonliteral format strings.

sys/net/lagg/if_lagg.c:2372:12: error:
    format string is not a string literal [-Werror,-Wformat-nonliteral]

diffstat:

 sys/net/lagg/if_laggproto.h |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r 6c765dac4302 -r 65403177ffcd sys/net/lagg/if_laggproto.h
--- a/sys/net/lagg/if_laggproto.h       Wed May 19 03:44:46 2021 +0000
+++ b/sys/net/lagg/if_laggproto.h       Wed May 19 06:13:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_laggproto.h,v 1.1 2021/05/17 04:07:43 yamaguchi Exp $       */
+/*     $NetBSD: if_laggproto.h,v 1.2 2021/05/19 06:13:08 rillig Exp $  */
 
 #ifndef        _NET_LAGG_IF_LAGGPROTO_H_
 #define _NET_LAGG_IF_LAGGPROTO_H_
@@ -226,7 +226,8 @@ lagg_portactive(struct lagg_port *lp)
        return false;
 }
 
-void           lagg_log(struct lagg_softc *, int, const char *, ...);
+void           lagg_log(struct lagg_softc *, int, const char *, ...)
+                   __printflike(3, 4);
 void           lagg_port_getref(struct lagg_port *, struct psref *);
 void           lagg_port_putref(struct lagg_port *, struct psref *);
 void           lagg_enqueue(struct lagg_softc *,



Home | Main Index | Thread Index | Old Index