diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-09-13 20:07:56 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-09-13 20:07:56 +0300 |
commit | c52a02a0f0025df0e83ba00dc469df0dc8838b5e (patch) | |
tree | d9f0443321dd00ead23b84b184c61476d0a15aee /builtin/add.c | |
parent | 94e83dcf5b5faaa22e32729305f8fd7090bfdfed (diff) | |
parent | 0058b3d5eedcf5777712e872e01f74bf8d933be7 (diff) |
Merge branch 'jk/unused-post-2.42-part2'
Unused parameters to functions are marked as such, and/or removed,
in order to bring us closer to -Wunused-parameter clean.
* jk/unused-post-2.42-part2:
parse-options: mark unused parameters in noop callback
interpret-trailers: mark unused "unset" parameters in option callbacks
parse-options: add more BUG_ON() annotations
merge: do not pass unused opt->value parameter
parse-options: mark unused "opt" parameter in callbacks
parse-options: prefer opt->value to globals in callbacks
checkout-index: delay automatic setting of to_tempfile
format-patch: use OPT_STRING_LIST for to/cc options
merge: simplify parsing of "-n" option
merge: make xopts a strvec
Diffstat (limited to 'builtin/add.c')
-rw-r--r-- | builtin/add.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/add.c b/builtin/add.c index 12c5aa6d1f..c27254a5cd 100644 --- a/builtin/add.c +++ b/builtin/add.c @@ -231,6 +231,8 @@ static char *chmod_arg; static int ignore_removal_cb(const struct option *opt, const char *arg, int unset) { + BUG_ON_OPT_ARG(arg); + /* if we are told to ignore, we are not adding removals */ *(int *)opt->value = !unset ? 0 : 1; return 0; |