From 7ff4dd491700dd2be4bb9f29c025550f733abf12 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 10 Sep 2019 19:47:28 -0400 Subject: [PATCH] Clean-up: lttng: silence warning in regenerate 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/regenerate.c | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.34.1