Skip to content

dropping more unused parameters

Jeff King git 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10convert: drop unused crlf_action from check_global_conv_flags_eol()convert.c+2 -20 replies
2/10drop unused argc parametersbuiltin/add.c builtin/commit.c commit.h +2 more+15 -150 replies
3/10env--helper: write to opt->value in parseopt helperbuiltin/env--helper.c+7 -40 replies
4/10assert PARSE_OPT_NONEG in parse-options callbacksbuiltin/am.c builtin/commit-graph.c builtin/env--helper.c +1 more+8 -00 replies
5/10push: drop unused repo argument to do_push()builtin/push.c+2 -20 replies
6/10sequencer: drop repository argument from run_git_commit()sequencer.c+5 -60 replies
7/10sparse-checkout: fill in some options boilerplatebuiltin/sparse-checkout.c+37 -00 replies
8/10test-advise: check argument count with argc instead of argvt/helper/test-advise.c+2 -20 replies
9/10sequencer: handle ignore_footer when parsing trailerssequencer.c+9 -00 replies
10/10dir.c: drop unused "untracked" from treat_path_fast()dir.c+1 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/10] dropping more unused parameters

This is the last of my series of patches to drop (or use) unused function parameters. I've been holding on to some of these for almost 2 years, because I wanted to make sure they weren't actually bugs (dropping unused parameters can never _introduce_ a bug, but it's a good opportunity to investigate whether the parameter _should_ have been used). I'm still not entirely convinced that patch 10 isn't actually a bug, but I wasn't able to puzzle it out either way, and it didn't seem worth holding up the topic any longer.

After this lands, I have a follow-on series that annotates cases where we can't drop parameters (e.g., functions which have to conform to a callback interface, but don't care about some of the parameters). And then after that we can flip on -Wunused-parameters going forward. Which I think is worth doing, as it has found some bugs (fixed in earlier series).

[01/10]: convert: drop unused crlf_action from check_global_conv_flags_eol() [02/10]: drop unused argc parameters
[03/10]: env--helper: write to opt->value in parseopt helper [04/10]: assert PARSE_OPT_NONEG in parse-options callbacks [05/10]: push: drop unused repo argument to do_push()
[06/10]: sequencer: drop repository argument from run_git_commit() [07/10]: sparse-checkout: fill in some options boilerplate [08/10]: test-advise: check argument count with argc instead of argv [09/10]: sequencer: handle ignore_footer when parsing trailers [10/10]: dir.c: drop unused "untracked" from treat_path_fast()

 builtin/add.c                                |  4 +--
 builtin/am.c                                 |  2 ++
 builtin/commit-graph.c                       |  2 ++
 builtin/commit.c                             | 12 +++----
 builtin/env--helper.c                        | 13 ++++---
 builtin/push.c                               |  4 +--
 builtin/sparse-checkout.c                    | 37 ++++++++++++++++++++
 commit.h                                     |  2 +-
 convert.c                                    |  4 +--
 dir.c                                        |  3 +-
 parse-options-cb.c                           |  2 ++
 revision.c                                   |  6 ++--
 sequencer.c                                  | 20 +++++++----
 t/helper/test-advise.c                       |  4 +--
 t/helper/test-submodule-nested-repo-config.c |  6 ++--
 15 files changed, 88 insertions(+), 33 deletions(-)

-Peff