]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
can: fix clang warning
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 11 Jan 2022 17:54:34 +0000 (09:54 -0800)
committerDavid Ahern <dsahern@kernel.org>
Wed, 26 Jan 2022 17:19:08 +0000 (10:19 -0700)
Fix warning about passing non-format string.

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

index 854ccc314e2bd57ed0411ed57b4f5b4e3a7d9dc6..6ea02a2a51c46afb49f651625a33acb4b862d1bc 100644 (file)
@@ -330,8 +330,9 @@ static void can_print_nl_indent(void)
        print_string(PRINT_FP, NULL, "%s", "\t ");
 }
 
-static void can_print_timing_min_max(const char *json_attr, const char *fp_attr,
-                                    int min, int max)
+static void __attribute__((format(printf, 2, 0)))
+can_print_timing_min_max(const char *json_attr, const char *fp_attr,
+                        int min, int max)
 {
        print_null(PRINT_FP, NULL, fp_attr, NULL);
        open_json_object(json_attr);