]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: add format attribute to tc_print_rate
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 11 Jan 2022 17:54:28 +0000 (09:54 -0800)
committerDavid Ahern <dsahern@kernel.org>
Wed, 26 Jan 2022 17:19:08 +0000 (10:19 -0700)
This catches future errors and silences warning from Clang.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@kernel.org>
tc/tc_util.c

index 48065897cee777a1f2399161222bb1bf775b725c..6d5eb754831aab013a286cc56e3a177671d451b3 100644 (file)
@@ -247,7 +247,8 @@ int get_percent_rate64(__u64 *rate, const char *str, const char *dev)
        return get_rate64(rate, r_str);
 }
 
-void tc_print_rate(enum output_type t, const char *key, const char *fmt,
+void __attribute__((format(printf, 3, 0)))
+tc_print_rate(enum output_type t, const char *key, const char *fmt,
                   unsigned long long rate)
 {
        print_rate(use_iec, t, key, fmt, rate);