From: Jérémie Galarneau Date: Tue, 10 Sep 2019 23:47:28 +0000 (-0400) Subject: Clean-up: lttng: silence warning in regenerate command handler X-Git-Tag: v2.11.0-rc4~67 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5ba15d379e34c74726269b4999295c02c93ed299;p=lttng-tools.git Clean-up: lttng: silence warning in regenerate 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/regenerate.c b/src/bin/lttng/commands/regenerate.c index c53df2492..cba04ac77 100644 --- a/src/bin/lttng/commands/regenerate.c +++ b/src/bin/lttng/commands/regenerate.c @@ -127,6 +127,7 @@ static int handle_command(const char **argv) } argc = count_arguments(argv); + assert(argc >= 1); cmd = &actions[i]; while (cmd->func != NULL) {