All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: netdev@vger.kernel.org
Cc: Stephen Hemminger <sthemmin@microsoft.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Subject: [PATCH v2 iproute2-next 08/11] tipc: fix clang warning about empty format string
Date: Tue, 11 Jan 2022 09:54:35 -0800	[thread overview]
Message-ID: <20220111175438.21901-9-sthemmin@microsoft.com> (raw)
In-Reply-To: <20220111175438.21901-1-sthemmin@microsoft.com>

When calling json_print with json only use a NULL instead of
empty string.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 tipc/link.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tipc/link.c b/tipc/link.c
index 9994ada2a367..53f49c8937db 100644
--- a/tipc/link.c
+++ b/tipc/link.c
@@ -332,7 +332,7 @@ static int _show_link_stat(const char *name, struct nlattr *attrs[],
 	open_json_object(NULL);
 
 	print_string(PRINT_ANY, "link", "Link <%s>\n", name);
-	print_string(PRINT_JSON, "state", "", NULL);
+	print_string(PRINT_JSON, "state", NULL, NULL);
 	open_json_array(PRINT_JSON, NULL);
 	if (attrs[TIPC_NLA_LINK_ACTIVE])
 		print_string(PRINT_ANY, NULL, "  %s", "ACTIVE");
-- 
2.30.2


  parent reply	other threads:[~2022-01-11 17:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 17:54 [PATCH v2 iproute2-next 00/11] clang warning fixes Stephen Hemminger
2022-01-11 17:54 ` [PATCH v2 iproute2-next 01/11] tc: add format attribute to tc_print_rate Stephen Hemminger
2022-01-11 17:54 ` [PATCH v2 iproute2-next 02/11] utils: add format attribute Stephen Hemminger
2022-01-11 17:54 ` [PATCH v2 iproute2-next 03/11] netem: fix clang warnings Stephen Hemminger
2022-01-11 17:54 ` [PATCH v2 iproute2-next 04/11] flower: " Stephen Hemminger
2022-01-11 17:54 ` [PATCH v2 iproute2-next 05/11] tc_util: fix clang warning in print_masked_type Stephen Hemminger
2022-01-11 17:54 ` [PATCH v2 iproute2-next 06/11] ipl2tp: fix clang warning Stephen Hemminger
2022-01-11 17:54 ` [PATCH v2 iproute2-next 07/11] can: " Stephen Hemminger
2022-01-11 17:54 ` Stephen Hemminger [this message]
2022-01-11 17:54 ` [PATCH v2 iproute2-next 09/11] tunnel: " Stephen Hemminger
2022-01-11 17:54 ` [PATCH v2 iproute2-next 10/11] libbpf: fix clang warning about format non-literal Stephen Hemminger
2022-01-11 17:54 ` [PATCH v2 iproute2-next 11/11] json_print: suppress clang format warning Stephen Hemminger
2022-01-16 23:18 ` [PATCH v2 iproute2-next 00/11] clang warning fixes David Ahern
2022-01-17  0:33   ` Stephen Hemminger
2022-01-17 15:29   ` Jamal Hadi Salim
2022-01-20 12:48     ` Victor Nogueira
2022-01-20 19:20       ` David Ahern
2022-01-20 20:21         ` Victor Nogueira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220111175438.21901-9-sthemmin@microsoft.com \
    --to=stephen@networkplumber.org \
    --cc=netdev@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.