Skip to content

Commit 0058b3d

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent d775365 commit 0058b3d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

parse-options-cb.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ int parse_opt_strvec(const struct option *opt, const char *arg, int unset)
227227
return 0;
228228
}
229229

230-
int parse_opt_noop_cb(const struct option *opt, const char *arg, int unset)
230+
int parse_opt_noop_cb(const struct option *opt UNUSED,
231+
const char *arg UNUSED,
232+
int unset UNUSED)
231233
{
232234
return 0;
233235
}

0 commit comments

Comments
 (0)