git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/6] unused function parameter potpourri

From
Elijah Newren <newren@gmail.com>
Date
Aug 19, 2022, 23:07 UTC
Message-ID
<CABPp-BFoFBE4o1-M258-DHQSbW8WS2-EQCipCdmq2ECi9BL7pg@mail.gmail.com>
In-Reply-To
<892b2a45-1b6b-aa87-4902-471793135183@github.com>

On Fri, Aug 19, 2022 at 12:35 PM Derrick Stolee <derrickstolee@github.com> wrote:

Show 21 quoted lines
>
> On 8/19/2022 4:48 AM, Jeff King wrote:
> > Here are a few small cleanups of unused function parameters. The first
> > five just drop the unused parameters. These are all trivially correct,
> > since otherwise the compiler would complain. But I tried to make sure
> > that dropping was the right thing in each (rather than it being a bug
> > where the parameter should have been used).
> >
> > The final one just uses the parameters for an assertion, following a
> > pattern we've used before.
> >
> > I'll try to cc the individual authors for each patch.
> >
> >   [1/6]: xdiff: drop unused mmfile parameters from xdl_do_histogram_diff()
> >   [2/6]: log-tree: drop unused commit param in remerge_diff()
> >   [3/6]: match_pathname(): drop unused "flags" parameter
> >   [4/6]: verify_one_sparse(): drop unused repository parameter
> >   [5/6]: reftable: drop unused parameter from reader_seek_linear()
> >   [6/6]: reflog: assert PARSE_OPT_NONEG in parse-options callbacks
>
> Thanks for doing this cleanup. It all looks correct to me.

Like Phillip, I seem to also have a blind spot for unused parameters -- this isn't the first one I created either.

Anyway, this series looks good to me as well.
> Patch 5 mentioned some choice as to modifying the parameter list
> versus using the UNUSED() macro. I think renaming the method can
> solve the uncertainty there, but it's also not necessary for the
> change to be correct.
Previous: Derrick Stolee
Message 21 of 21 in “unused function parameter potpourri”
  1. 0/6 unused function parameter potpourriJeff King, Aug 19, 2022
  2. 1/6 xdiff: drop unused mmfile parameters from xdl_do_histogram_diff()Jeff King, Aug 19, 2022
  3. Phillip WoodAug 19, 2022
  4. Jeff KingAug 20, 2022
  5. 7/6 xdiff: drop unused mmfile parameters from xdl_do_patience_diff()Jeff King, Aug 20, 2022
  6. Phillip WoodAug 26, 2022
  7. 2/6 log-tree: drop unused commit param in remerge_diff()Jeff King, Aug 19, 2022
  8. Elijah NewrenAug 19, 2022
  9. Jeff KingAug 20, 2022
  10. 3/6 match_pathname(): drop unused "flags" parameterJeff King, Aug 19, 2022
  11. 4/6 verify_one_sparse(): drop unused repository parameterJeff King, Aug 19, 2022
  12. Derrick StoleeAug 19, 2022
  13. Jeff KingAug 20, 2022
  14. René ScharfeAug 20, 2022
  15. 4/6 verify_one_sparse(): drop unused repository parameterJeff King, Aug 20, 2022
  16. 5/6 reftable: drop unused parameter from reader_seek_linear()Jeff King, Aug 19, 2022
  17. Derrick StoleeAug 19, 2022
  18. Han-Wen NienhuysAug 22, 2022
  19. 6/6 reflog: assert PARSE_OPT_NONEG in parse-options callbacksJeff King, Aug 19, 2022
  20. Derrick StoleeAug 19, 2022
  21. Elijah NewrenAug 19, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.