parse-options: mark unused parameters in noop callback

Unsurprisingly, the noop options callback doesn't bother to look at any
of its parameters. Let's mark them so that -Wunused-parameter does not
complain.

Another option would be to drop the callback and have parse-options
itself recognize OPT_NOOP_NOARG. But that seems like extra work for no
real benefit.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2023-08-31 17:22:20 -04:00 committed by Junio C Hamano
parent d775365db3
commit 0058b3d5ee
1 changed files with 3 additions and 1 deletions

View File

@ -227,7 +227,9 @@ int parse_opt_strvec(const struct option *opt, const char *arg, int unset)
return 0;
}
int parse_opt_noop_cb(const struct option *opt, const char *arg, int unset)
int parse_opt_noop_cb(const struct option *opt UNUSED,
const char *arg UNUSED,
int unset UNUSED)
{
return 0;
}