aboutsummaryrefslogtreecommitdiffstats
path: root/parse-options-cb.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2023-08-31 17:22:20 -0400
committerJunio C Hamano <gitster@pobox.com>2023-09-05 14:48:17 -0700
commit0058b3d5eedcf5777712e872e01f74bf8d933be7 (patch)
treedff66cf6450b7607d378e69bc04f9dc26b710c0c /parse-options-cb.c
parentd775365db321c9f05c12809438d3c801d7e445af (diff)
downloadgit-0058b3d5eedcf5777712e872e01f74bf8d933be7.tar.gz
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>
Diffstat (limited to 'parse-options-cb.c')
-rw-r--r--parse-options-cb.c4
1 files changed, 3 insertions, 1 deletions
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;
}