From fa81c7561fdc56550b6c07287fa8aea2957d150f Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Wed, 3 Apr 2024 23:59:21 +0200 Subject: [PATCH] cov: missing initializer Ensure there is no code path with uninitialized takes_arg. --- tools/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/command.c b/tools/command.c index 20b1811f8..121fc8ec6 100644 --- a/tools/command.c +++ b/tools/command.c @@ -1171,7 +1171,7 @@ static void _include_required_opt_args(struct cmd_context *cmdtool, struct comma static void _add_required_line(struct cmd_context *cmdtool, struct command *cmd, int argc, char *argv[]) { int i; - int takes_arg; + int takes_arg = 0; int prev_was_opt = 0, prev_was_pos = 0; int orig_ro_count = 0;