From: Jeff King Date: Thu, 31 Aug 2023 21:22:20 +0000 (-0400) Subject: parse-options: mark unused parameters in noop callback X-Git-Tag: v2.43.0-rc0~101^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0058b3d5eedcf5777712e872e01f74bf8d933be7;p=thirdparty%2Fgit.git 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 Signed-off-by: Junio C Hamano --- diff --git a/parse-options-cb.c b/parse-options-cb.c index a24521dee0..bdc7fae497 100644 --- a/parse-options-cb.c +++ b/parse-options-cb.c @@ -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; }