"final" batch of unused parameter cleanups
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest14 patches 5 repliesIn review
Patches in v1 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/14] "final" batch of unused parameter cleanups
This is a continuation of my efforts to get us compiling with -Wunused-parameter. This round finishes most of the cleanups and fixes I intend to do (though I have a handful of cleanup cases that I'm still poking at to make sure they're not in fact bugs). After that, I have some patches to annotate unused parameters we can't get rid of (e.g., for cases where we're conforming to a callback interface), and then we can finally flip the warning on for developer-mode.
This series has two small conflicts with what's in "pu":
- there's a minor textual conflict in upload-pack
- it changes cmd_rebase__interactive(), which moved into builtin/rebase.c in pw/rebase-i-internal. Because the old file went away, this results in a delete/modified conflict, and you have to manually fix up the result, like so:
builtin/rebase--interactive.c deleted +0 -0
builtin/rebase.c +1 -1
@@ -508,7 +508,7 @@ int cmd_rebase__interactive(int argc, const char **argv, const char *prefix)if (argc ==1 )usage_with_options (builtin_rebase_interactive_usage, options); - argc =parse_options (argc, argv,NULL , options, + argc =parse_options (argc, argv, prefix, options, builtin_rebase_interactive_usage,PARSE_OPT_KEEP_ARGV0 );if (!is_null_oid (&squash_onto))
Most of the patches are pretty straightforward and won't have any behavior change (the thing to review in them is confirming that not using the parameter is the right thing to do; I've tried to make a case for each in the commit message). The trickiest one is patch 14.
[01/14]: cmd_{read,write}_tree: rename "unused" variable that is used [02/14]: submodule: drop unused prefix parameter from some functions [03/14]: builtin: consistently pass cmd_* prefix to parse_options [04/14]: clone: drop dest parameter from copy_alternates() [05/14]: read-cache: drop unused parameter from threaded load [06/14]: wt-status: drop unused status parameter
[07/14]: mktree: drop unused length parameter
[08/14]: name-rev: drop unused parameters from is_better_name() [09/14]: pack-objects: drop unused rev_info parameters
[10/14]: receive-pack: drop unused "commands" from prepare_shallow_update() [11/14]: remove_all_fetch_refspecs(): drop unused "remote" parameter [12/14]: rev-list: drop unused void pointer from finish_commit() [13/14]: show-branch: drop unused parameter from show_independent() [14/14]: verify-commit: simplify parameters to run_gpg_verify()
builtin/clone.c | 5 ++--- builtin/column.c | 2 +- builtin/hash-object.c | 2 +- builtin/mktree.c | 4 ++-- builtin/name-rev.c | 5 +---- builtin/pack-objects.c | 8 ++++---- builtin/range-diff.c | 2 +- builtin/read-tree.c | 4 ++-- builtin/rebase--interactive.c | 2 +- builtin/receive-pack.c | 5 ++--- builtin/remote.c | 4 ++-- builtin/rev-list.c | 10 +++++----- builtin/rm.c | 6 +++--- builtin/show-branch.c | 3 +-- builtin/submodule--helper.c | 3 +-- builtin/upload-pack.c | 2 +- builtin/verify-commit.c | 23 ++++++++--------------- builtin/write-tree.c | 12 ++++++------ read-cache.c | 4 ++-- submodule.c | 10 ++++------ submodule.h | 3 +-- wt-status.c | 6 ++---- 22 files changed, 53 insertions(+), 72 deletions(-)