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

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Wed, 31 Aug 2022 10:00:50 +0200

On Tue, Aug 30 2022, Junio C Hamano wrote:

> * 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. <[email-masked]>
>  cf. <[email-masked]>
>  source: <[email-masked]>

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/[email-masked]/
2. https://lore.kernel.org/git/[email-masked]/
3. https://lore.kernel.org/git/[email-masked]/
4. https://lore.kernel.org/git/[email-masked]/