]> git.ipfire.org Git - thirdparty/iproute2.git/commit
json_print: suppress clang format warning
authorStephen Hemminger <stephen@networkplumber.org>
Tue, 11 Jan 2022 17:54:38 +0000 (09:54 -0800)
committerDavid Ahern <dsahern@kernel.org>
Wed, 26 Jan 2022 17:19:08 +0000 (10:19 -0700)
commitba5ac984eb00a2e7b9199c3cffb219fdfa087db5
tree7a44eb80d3946140395b1b23808a15d0e1aefcd5
parentbf71c8f214b786f3180ebb7a6444ca75c75d8bfd
json_print: suppress clang format warning

Clang complains about using non-format string in print_color_tv.

The ideal fix would be to put format attribute on all the print_XXX functions
in json_print.h. But that leads to furthur complications because the existing
code may pass a NULL as format if the format is unused since the print
is being done only for JSON output.

The comprimise is to just disable the warning for the one place
it shows up.

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