From: Jérémie Galarneau Date: Tue, 10 Sep 2019 23:43:16 +0000 (-0400) Subject: Clean-up: lttng: silence warning in metadata command handler X-Git-Tag: v2.12.0-rc1~415 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=9927c13b08e58e711104893496060fc5eb505f34;p=lttng-tools.git Clean-up: lttng: silence warning in metadata command handler 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 --- 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) {