diff mbox series

[v4,iproute2-next,07/11] can: fix clang warning

Message ID 20220120211153.189476-8-stephen@networkplumber.org (mailing list archive)
State Accepted
Commit 371c13e8f22fd37f4c5b7b5c4cdf411b2bbb2260
Delegated to: David Ahern
Headers show
Series fix clang warnings | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Stephen Hemminger Jan. 20, 2022, 9:11 p.m. UTC
Fix warning about passing non-format string.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 ip/iplink_can.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/ip/iplink_can.c b/ip/iplink_can.c
index 854ccc314e2b..6ea02a2a51c4 100644
--- a/ip/iplink_can.c
+++ b/ip/iplink_can.c
@@ -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);