git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: Derrick Stolee <derrickstolee@github.com>
Subject: [PATCH 4/6] verify_one_sparse(): drop unused repository parameter
Date: Fri, 19 Aug 2022 04:51:04 -0400	[thread overview]
Message-ID: <Yv9O+HDMLKglLcqY@coredump.intra.peff.net> (raw)
In-Reply-To: <Yv9Oay+tNqhLDqVl@coredump.intra.peff.net>

This function has never used its repository parameter since it was
introduced in 9ad2d5ea71 (sparse-index: loose integration with
cache_tree_verify(), 2021-03-30). As that commit notes, it may
eventually be extended further, and that might require looking at a
repository struct. But it would be easy to add it back later if
necessary. In the mean time, dropping it makes the code shorter and
appease -Wunused-parameter.

Signed-off-by: Jeff King <peff@peff.net>
---
 cache-tree.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/cache-tree.c b/cache-tree.c
index 56db0b5026..c97111cccf 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -857,9 +857,7 @@ int cache_tree_matches_traversal(struct cache_tree *root,
 	return 0;
 }
 
-static void verify_one_sparse(struct repository *r,
-			      struct index_state *istate,
-			      struct cache_tree *it,
+static void verify_one_sparse(struct index_state *istate,
 			      struct strbuf *path,
 			      int pos)
 {
@@ -910,7 +908,7 @@ static int verify_one(struct repository *r,
 			return 1;
 
 		if (pos >= 0) {
-			verify_one_sparse(r, istate, it, path, pos);
+			verify_one_sparse(istate, path, pos);
 			return 0;
 		}
 
-- 
2.37.2.928.g0821088f4a


  parent reply	other threads:[~2022-08-19  8:51 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19  8:48 [PATCH 0/6] unused function parameter potpourri Jeff King
2022-08-19  8:49 ` [PATCH 1/6] xdiff: drop unused mmfile parameters from xdl_do_histogram_diff() Jeff King
2022-08-19 13:32   ` Phillip Wood
2022-08-20  6:58     ` Jeff King
2022-08-20  7:36       ` [PATCH 7/6] xdiff: drop unused mmfile parameters from xdl_do_patience_diff() Jeff King
2022-08-26 13:15         ` Phillip Wood
2022-08-19  8:50 ` [PATCH 2/6] log-tree: drop unused commit param in remerge_diff() Jeff King
2022-08-19 23:05   ` Elijah Newren
2022-08-20  7:04     ` Jeff King
2022-08-19  8:50 ` [PATCH 3/6] match_pathname(): drop unused "flags" parameter Jeff King
2022-08-19  8:51 ` Jeff King [this message]
2022-08-19 19:04   ` [PATCH 4/6] verify_one_sparse(): drop unused repository parameter Derrick Stolee
2022-08-20  7:01     ` Jeff King
2022-08-20  8:48   ` René Scharfe
2022-08-20  9:02     ` [PATCH v2 " Jeff King
2022-08-19  8:54 ` [PATCH 5/6] reftable: drop unused parameter from reader_seek_linear() Jeff King
2022-08-19 19:06   ` Derrick Stolee
2022-08-22  7:46     ` Han-Wen Nienhuys
2022-08-19  8:55 ` [PATCH 6/6] reflog: assert PARSE_OPT_NONEG in parse-options callbacks Jeff King
2022-08-19 19:08 ` [PATCH 0/6] unused function parameter potpourri Derrick Stolee
2022-08-19 23:07   ` Elijah Newren

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=Yv9O+HDMLKglLcqY@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=derrickstolee@github.com \
    --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).