Re: [PATCH 1/6] xdiff: drop unused mmfile parameters from xdl_do_histogram_diff()
- From
Jeff King <peff@peff.net>
- Date
- Aug 20, 2022, 06:58 UTC
- Message-ID
- <YwCGJLJU2+ui+hvn@coredump.intra.peff.net>
- In-Reply-To
- <CAPoeCOa6BDsunamy7_GtaSy-gL_0r3kAwDJ7ffA_uiFUzhen9w@mail.gmail.com>
On Fri, Aug 19, 2022 at 02:32:13PM +0100, Phillip Wood wrote:
> Thanks, I seem to have a blind spot for unused parameters (I think > this is at least the third such fix from you for one of my commits), > I'm really looking forward to having -Wunused-parameter enabled, > thanks for working on it.
I think everyone does. ;) I know I couldn't have found these without help from the compiler.
Show 5 quoted lines
> Looking at the xpatience.c I think we can remove the mmfile_t > parameters there as well, they are only end up being used because > patience_diff() gets called recursively. I'm about to go off list for > a week, but I can look at putting a patch together for that when I get > back unless you want to.
I wondered that, too, but they also get passed in to fill_hashmap(), which records the pointers in its "struct hashmap". It looks like those fields are never accessed, though, and could even be removed from the struct entirely!
So I think there is some room for cleanup.
-Peff