git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Subject: [PATCH 0/14] "final" batch of unused parameter cleanups
Date: Thu, 9 May 2019 17:25:59 -0400	[thread overview]
Message-ID: <20190509212558.GA15438@sigill.intra.peff.net> (raw)

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:

diff --git a/builtin/rebase--interactive.c b/builtin/rebase--interactive.c
deleted file mode 100644
index 72fd4b53a8..0000000000
diff --git a/builtin/rebase.c b/builtin/rebase.c
index 8c2cbc72f6..cc1e1a997d 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -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(-)


             reply	other threads:[~2019-05-09 21:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09 21:25 Jeff King [this message]
2019-05-09 21:27 ` [PATCH 01/14] cmd_{read,write}_tree: rename "unused" variable that is used Jeff King
2019-05-10 12:07   ` Derrick Stolee
2019-05-13  5:14   ` Junio C Hamano
2019-05-09 21:27 ` [PATCH 02/14] submodule: drop unused prefix parameter from some functions Jeff King
2019-05-09 21:28 ` [PATCH 03/14] builtin: consistently pass cmd_* prefix to parse_options Jeff King
2019-05-10 12:10   ` Derrick Stolee
2019-05-09 21:29 ` [PATCH 04/14] clone: drop dest parameter from copy_alternates() Jeff King
2019-05-09 21:29 ` [PATCH 05/14] read-cache: drop unused parameter from threaded load Jeff King
2019-05-09 21:30 ` [PATCH 06/14] wt-status: drop unused status parameter Jeff King
2019-05-09 21:30 ` [PATCH 07/14] mktree: drop unused length parameter Jeff King
2019-05-09 21:30 ` [PATCH 08/14] name-rev: drop unused parameters from is_better_name() Jeff King
2019-05-09 21:31 ` [PATCH 09/14] pack-objects: drop unused rev_info parameters Jeff King
2019-05-09 21:31 ` [PATCH 10/14] receive-pack: drop unused "commands" from prepare_shallow_update() Jeff King
2019-05-09 21:31 ` [PATCH 11/14] remove_all_fetch_refspecs(): drop unused "remote" parameter Jeff King
2019-05-09 21:32 ` [PATCH 12/14] rev-list: drop unused void pointer from finish_commit() Jeff King
2019-05-09 21:32 ` [PATCH 13/14] show-branch: drop unused parameter from show_independent() Jeff King
2019-05-09 21:32 ` [PATCH 14/14] verify-commit: simplify parameters to run_gpg_verify() Jeff King
2019-05-10 12:19   ` Derrick Stolee
2019-05-10 12:20 ` [PATCH 0/14] "final" batch of unused parameter cleanups Derrick Stolee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190509212558.GA15438@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).