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

jk/unused-annotation + ab/unused-annotation (was: What's cooking in git.git (Aug 2022, #10; Tue, 30))

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Aug 31, 2022, 08:00 UTC
Message-ID
<220831.86fshcal32.gmgdl@evledraar.gmail.com>
In-Reply-To
<xmqqilm9k0bc.fsf@gitster.g>
On Tue, Aug 30 2022, Junio C Hamano wrote:
Show 22 quoted lines
> * jk/unused-annotation (2022-08-19) 11 commits
>   (merged to 'next' on 2022-08-24 at 2174b8c75d)
>  + is_path_owned_by_current_uid(): mark "report" parameter as unused
>  + run-command: mark unused async callback parameters
>  + mark unused read_tree_recursive() callback parameters
>  + hashmap: mark unused callback parameters
>  + config: mark unused callback parameters
>  + streaming: mark unused virtual method parameters
>  + transport: mark bundle transport_options as unused
>  + refs: mark unused virtual method parameters
>  + refs: mark unused reflog callback parameters
>  + refs: mark unused each_ref_fn parameters
>  + git-compat-util: add UNUSED macro
>
>  Annotate function parameters that are not used (but cannot be
>  removed for structural reasons), to prepare us to later compile
>  with -Wunused warning turned on.
>
>  Will revert; coccinelle cannot even parse the annotation correctly.
>  cf. <Ywh7ppVFk6VK1Ybs@coredump.intra.peff.net>
>  cf. <xmqqy1v7r3so.fsf@gitster.g>
>  source: <Yv9gxqH6nK2KYnNj@coredump.intra.peff.net>

I see you did this already in 4f464a7b54a (Revert "Merge branch 'jk/unused-annotation' into next", 2022-08-30), per [1] and [2] you & Jeff seemed to agree on my approach in [3] as a way forward.

The ab/unused-annotation in "seen" (not in this WC E-Mail) is a rebased version of 1/2 of that series. Without the 2/2 [4] it won't catch the accidental use of parameters.

Were you planning on picking that up, or would you like it submitted separately? I know there were reservations about (ab)using "deprecated" for this, but per the rationale in [4] and Jeff's [2] it seemed like there was consensus to go that route.

1. https://lore.kernel.org/git/xmqqy1v7r3so.fsf@gitster.g/
2. https://lore.kernel.org/git/Ywh7ppVFk6VK1Ybs@coredump.intra.peff.net/
3. https://lore.kernel.org/git/cover-0.2-00000000000-20220825T170709Z-avarab@gmail.com/
4. https://lore.kernel.org/git/patch-2.2-0f603594e5e-20220825T170709Z-avarab@gmail.com/
Previous: Johannes SchindelinNext: Jeff King
Message 3 of 10 in “What's cooking in git.git (Aug 2022, #10; Tue, 30)”
  1. Junio C HamanoAug 30, 2022
  2. js/bisect-in-c, was Re: What's cooking in git.git (Aug 2022, #10; Tue, 30)Johannes Schindelin, Aug 30, 2022
  3. jk/unused-annotation + ab/unused-annotation (was: What's cooking in git.git (Aug 2022, #10; Tue, 30))Ævar Arnfjörð Bjarmason, Aug 31, 2022
  4. Jeff KingAug 31, 2022
  5. Junio C HamanoAug 31, 2022
  6. Ævar Arnfjörð BjarmasonAug 31, 2022
  7. js/add-p-diff-parsing-fix (was: What's cooking in git.git (Aug 2022, #10; Tue, 30))Ævar Arnfjörð Bjarmason, Aug 31, 2022
  8. Phillip WoodAug 31, 2022
  9. Johannes SchindelinAug 31, 2022
  10. Junio C HamanoAug 31, 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.