Merge branch 'jk/unused-parameter-fixes'
Various functions have been audited for "-Wunused-parameter" warnings and bugs in them got fixed. * jk/unused-parameter-fixes: midx: double-check large object write loop assert NOARG/NONEG behavior of parse-options callbacks parse-options: drop OPT_DATE() apply: return -1 from option callback instead of calling exit(1) cat-file: report an error on multiple --batch options tag: mark "--message" option with NONEG show-branch: mark --reflog option as NONEG format-patch: mark "--no-numbered" option with NONEG status: mark --find-renames option with NONEG cat-file: mark batch options with NONEG pack-objects: mark index-version option as NONEG ls-files: mark exclude options as NONEG am: handle --no-patch-format option apply: mark include/exclude options as NONEG
This commit is contained in:
@ -161,6 +161,9 @@ static int opt_parse_m(const struct option *opt, const char *arg, int unset)
|
||||
static int opt_parse_rename_score(const struct option *opt, const char *arg, int unset)
|
||||
{
|
||||
const char **value = opt->value;
|
||||
|
||||
BUG_ON_OPT_NEG(unset);
|
||||
|
||||
if (arg != NULL && *arg == '=')
|
||||
arg = arg + 1;
|
||||
|
||||
@ -1335,7 +1338,7 @@ int cmd_status(int argc, const char **argv, const char *prefix)
|
||||
OPT_BOOL(0, "no-renames", &no_renames, N_("do not detect renames")),
|
||||
{ OPTION_CALLBACK, 'M', "find-renames", &rename_score_arg,
|
||||
N_("n"), N_("detect renames, optionally set similarity index"),
|
||||
PARSE_OPT_OPTARG, opt_parse_rename_score },
|
||||
PARSE_OPT_OPTARG | PARSE_OPT_NONEG, opt_parse_rename_score },
|
||||
OPT_END(),
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user