git-commit-vandalism/builtin
Jeff King 6ba21fa65c mark "argv" as unused when we check argc
A few commands don't take any options at all, and confirm this by
checking argc. After that they have no need to look at argv, but we're
still stuck with it by convention. Let's annotate these cases so that
the compiler doesn't complain with -Wunused-parameter.

Note that in scalar and get-tar-commit-id, we're forced to keep argv by
calling convention (the functions must match cmd_main() and builtin
cmd_foo() conventions, respectively). In diff, these are subcommand
modes that we call individually, so we _could_ just drop the argv
parameters entirely. But it's weird to pass argc without argv, and it
implies that the caller knows that the subcommands aren't interested in
further arguments. It's less confusing to just keep them and silence the
compiler warning.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2023-03-28 14:11:24 -07:00
..
add.c add API: remove run_add_interactive() wrapper function 2023-02-06 15:03:34 -08:00
am.c Merge branch 'jc/gpg-lazy-init' 2023-03-17 14:03:10 -07:00
annotate.c
apply.c apply.c: remove unnecessary include 2022-04-06 09:42:14 -07:00
archive.c parse-options: consistently allocate memory in fix_filename() 2023-03-06 13:14:45 -08:00
bisect.c Merge branch 'rj/bisect-already-used-branch' 2023-03-19 15:03:11 -07:00
blame.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
branch.c Merge branch 'rj/branch-copy-and-rename' into maint-2.39 2023-02-14 14:15:55 -08:00
bugreport.c built-ins: use free() not UNLEAK() if trivial, rm dead code 2022-11-21 12:32:48 +09:00
bundle.c Merge branch 'jk/bundle-use-dash-for-stdfiles' 2023-03-19 15:03:12 -07:00
cat-file.c Merge branch 'jk/unused-post-2.39-part2' 2023-03-17 14:03:09 -07:00
check-attr.c attr: add flag --source to work with tree-ish 2023-01-14 08:49:55 -08:00
check-ignore.c cocci: apply "pending" index-compatibility to some "builtin/*.c" 2022-11-21 12:06:15 +09:00
check-mailmap.c ident.h: move ident-related declarations out of cache.h 2023-02-23 17:25:29 -08:00
check-ref-format.c builtins: annotate always-empty prefix parameters 2023-03-28 14:11:24 -07:00
checkout--worker.c alloc.h: move ALLOC_GROW() functions from cache.h 2023-02-23 17:25:28 -08:00
checkout-index.c cocci: apply "pending" index-compatibility to some "builtin/*.c" 2022-11-21 12:06:15 +09:00
checkout.c Merge branch 'jk/bundle-use-dash-for-stdfiles' 2023-03-19 15:03:12 -07:00
clean.c Merge branch 'ab/various-leak-fixes' 2023-02-22 14:55:45 -08:00
clone.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
column.c column: fix parsing of the '--nl' option 2021-08-26 14:36:27 -07:00
commit-graph.c replace-object.h: move read_replace_refs declaration from cache.h to here 2023-02-23 17:25:30 -08:00
commit-tree.c Merge branch 'jc/gpg-lazy-init' 2023-03-17 14:03:10 -07:00
commit.c Merge branch 'jc/gpg-lazy-init' 2023-03-17 14:03:10 -07:00
config.c ident.h: move ident-related declarations out of cache.h 2023-02-23 17:25:29 -08:00
count-objects.c for_each_object: mark unused callback parameters 2023-02-24 09:13:31 -08:00
credential-cache--daemon.c Merge branch 'en/header-cleanup' 2023-03-17 14:03:09 -07:00
credential-cache.c credential-cache: check for windows specific errors 2021-09-14 09:30:54 -07:00
credential-store.c
credential.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
describe.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
diagnose.c Merge branch 'ab/doc-synopsis-and-cmd-usage' 2022-10-28 11:26:54 -07:00
diff-files.c cocci: apply "pending" index-compatibility to some "builtin/*.c" 2022-11-21 12:06:15 +09:00
diff-index.c cocci: apply "pending" index-compatibility to some "builtin/*.c" 2022-11-21 12:06:15 +09:00
diff-tree.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
diff.c mark "argv" as unused when we check argc 2023-03-28 14:11:24 -07:00
difftool.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
fast-export.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
fast-import.c fast-import: fix file access when run from subdir 2023-03-28 14:11:24 -07:00
fetch-pack.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
fetch.c Merge branch 'ew/fetch-no-write-fetch-head-fix' 2023-03-19 15:03:13 -07:00
fmt-merge-msg.c merge: allow to pretend a merge is made into a different branch 2021-12-20 14:55:02 -08:00
for-each-ref.c for-each-ref: delay parsing of --sort=<atom> options 2021-10-20 14:33:07 -07:00
for-each-repo.c for-each-repo: interpolate repo path arguments 2022-11-14 22:39:25 -05:00
fsck.c Merge branch 'jk/unused-post-2.39-part2' 2023-03-17 14:03:09 -07:00
fsmonitor--daemon.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
gc.c Merge branch 'jk/unused-post-2.39-part2' 2023-03-17 14:03:09 -07:00
get-tar-commit-id.c mark "argv" as unused when we check argc 2023-03-28 14:11:24 -07:00
grep.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
hash-object.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
help.c Merge branch 'ab/doc-synopsis-and-cmd-usage' 2022-10-28 11:26:54 -07:00
hook.c hook: support a --to-stdin=<path> option 2023-02-08 12:50:03 -08:00
index-pack.c replace-object.h: move read_replace_refs declaration from cache.h to here 2023-02-23 17:25:30 -08:00
init-db.c doc txt & -h consistency: add missing options 2022-10-13 09:32:57 -07:00
interpret-trailers.c doc txt & -h consistency: add missing options 2022-10-13 09:32:57 -07:00
log.c Merge branch 'jk/format-patch-ignore-noprefix' 2023-03-21 14:18:55 -07:00
ls-files.c Merge branch 'aj/ls-files-format-fix' 2023-03-21 14:18:55 -07:00
ls-remote.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
ls-tree.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
mailinfo.c
mailsplit.c builtins: annotate always-empty prefix parameters 2023-03-28 14:11:24 -07:00
merge-base.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
merge-file.c merge-file: fix memory leaks on error path 2022-07-01 11:43:43 -07:00
merge-index.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
merge-ours.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
merge-recursive.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
merge-tree.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
merge.c Merge branch 'jc/gpg-lazy-init' 2023-03-17 14:03:10 -07:00
mktag.c builtins: always pass prefix to parse_options() 2023-03-28 14:11:24 -07:00
mktree.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
multi-pack-index.c multi-pack-index: avoid writing to global in option callback 2022-10-06 09:56:51 -07:00
mv.c alloc.h: move ALLOC_GROW() functions from cache.h 2023-02-23 17:25:28 -08:00
name-rev.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
notes.c Merge branch 'jk/unused-post-2.39-part2' 2023-03-17 14:03:09 -07:00
pack-objects.c Merge branch 'jk/unused-post-2.39-part2' 2023-03-17 14:03:09 -07:00
pack-redundant.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
pack-refs.c doc txt & -h consistency: add missing options and labels 2022-10-13 09:32:56 -07:00
patch-id.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
prune-packed.c i18n: remove from i18n strings that do not hold translatable parts 2022-02-04 13:58:28 -08:00
prune.c Merge branch 'jk/unused-post-2.39-part2' 2023-03-17 14:03:09 -07:00
pull.c Merge branch 'jc/gpg-lazy-init' 2023-03-17 14:03:10 -07:00
push.c Merge branch 'jc/gpg-lazy-init' 2023-03-17 14:03:10 -07:00
range-diff.c diff: factor out add_diff_options() 2022-12-02 08:25:29 +09:00
read-tree.c Merge branch 'en/header-cleanup' 2023-03-17 14:03:09 -07:00
rebase.c Merge branch 'jk/format-patch-ignore-noprefix' 2023-03-21 14:18:55 -07:00
receive-pack.c Merge branch 'ps/receive-pack-unlock-before-die' 2023-03-21 14:18:55 -07:00
reflog.c refs: unify parse_worktree_ref() and ref_type() 2022-09-19 11:11:11 -07:00
remote-ext.c builtins: annotate always-empty prefix parameters 2023-03-28 14:11:24 -07:00
remote-fd.c builtins: annotate always-empty prefix parameters 2023-03-28 14:11:24 -07:00
remote.c Merge branch 'rs/no-more-run-command-v' 2022-11-08 17:15:12 -05:00
repack.c Merge branch 'jk/unused-post-2.39-part2' 2023-03-17 14:03:09 -07:00
replace.c replace-object.h: move read_replace_refs declaration from cache.h to here 2023-02-23 17:25:30 -08:00
rerere.c diff: mark unused parameters in callbacks 2022-12-13 22:16:23 +09:00
reset.c Merge branch 'jk/bundle-use-dash-for-stdfiles' 2023-03-19 15:03:12 -07:00
rev-list.c Merge branch 'ew/fetch-hiderefs' 2023-03-17 14:03:10 -07:00
rev-parse.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
revert.c builtins: always pass prefix to parse_options() 2023-03-28 14:11:24 -07:00
rm.c alloc.h: move ALLOC_GROW() functions from cache.h 2023-02-23 17:25:28 -08:00
send-pack.c Merge branch 'jk/fix-proto-downgrade-to-v0' 2023-03-28 10:51:52 -07:00
shortlog.c shortlog: implement --group=committer in terms of --group=<format> 2022-10-24 14:48:05 -07:00
show-branch.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
show-index.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
show-ref.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
sparse-checkout.c sparse-checkout: avoid using internal API of unpack-trees, take 2 2023-02-27 08:29:51 -08:00
stash.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
stripspace.c i18n: remove from i18n strings that do not hold translatable parts 2022-02-04 13:58:28 -08:00
submodule--helper.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
symbolic-ref.c Merge branch 'ab/doc-synopsis-and-cmd-usage' 2022-10-28 11:26:54 -07:00
tag.c Merge branch 'jk/bundle-use-dash-for-stdfiles' 2023-03-19 15:03:12 -07:00
unpack-file.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
unpack-objects.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
update-index.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
update-ref.c update-ref: fix streaming of status updates 2021-09-03 11:35:15 -07:00
update-server-info.c doc txt & -h consistency: add missing options and labels 2022-10-13 09:32:56 -07:00
upload-archive.c builtins: annotate always-empty prefix parameters 2023-03-28 14:11:24 -07:00
upload-pack.c replace-object.h: move read_replace_refs declaration from cache.h to here 2023-02-23 17:25:30 -08:00
var.c builtins: mark unused prefix parameters 2023-03-28 14:11:24 -07:00
verify-commit.c drop pure pass-through config callbacks 2023-02-27 08:00:39 -08:00
verify-pack.c doc txt & -h consistency: add or fix optional "--" syntax 2022-10-13 09:32:56 -07:00
verify-tag.c drop pure pass-through config callbacks 2023-02-27 08:00:39 -08:00
worktree.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00
write-tree.c cache.h: remove dependence on hex.h; make other files include it explicitly 2023-02-23 17:25:29 -08:00