From 9927c13b08e58e711104893496060fc5eb505f34 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 10 Sep 2019 19:43:16 -0400 Subject: [PATCH 1/1] Clean-up: lttng: silence warning in metadata command handler MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit argv[0] is used before checking argc, resulting in a warning that argv could be of zero-length. This is not a reachable bug; it really is a false positive. Signed-off-by: Jérémie Galarneau --- src/bin/lttng/commands/metadata.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/lttng/commands/metadata.c b/src/bin/lttng/commands/metadata.c index 663099dfd..e702c5eba 100644 --- a/src/bin/lttng/commands/metadata.c +++ b/src/bin/lttng/commands/metadata.c @@ -108,6 +108,7 @@ static int handle_command(const char **argv) } argc = count_arguments(argv); + assert(argc >= 1); cmd = &actions[i]; while (cmd->func != NULL) { -- 2.34.1