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.12.0-rc1~414 X-Git-Url: http://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=7ff4dd491700dd2be4bb9f29c025550f733abf12 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) {