Re: [PATCH v3 01/42] parse-options: support --git-completion-helper
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Dec 2, 2018, 13:41 UTC
- Message-ID
- <87va4cujtx.fsf@evledraar.gmail.com>
- In-Reply-To
- <20180209110221.27224-2-pclouds@gmail.com>
On Fri, Feb 09 2018, Nguyễn Thái Ngọc Duy wrote:
> +static int show_gitcomp(struct parse_opt_ctx_t *ctx,
> + const struct option *opts)
> +{Says it returns 'static int'...
> [...] > + exit(0);
Then just exits...
> + /* lone --git-completion-helper is asked by git-completion.bash */ > + if (ctx->total == 1 && !strcmp(arg + 1, "-git-completion-helper")) > + return show_gitcomp(ctx, options);
This return value is never used.
Whine from SunCC (not fatal, also this was in v2.17.0 so no need to fix before 2.20, just saw this now):
"parse-options.c", line 520: warning: Function has no return
statement : show_gitcomp