mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <>
To: Jeff King <>
Cc:, "Ævar Arnfjörð Bjarmason" <>
Subject: Re: [PATCH 1/4] mailmap: drop debugging code
Date: Fri, 17 Mar 2023 16:08:43 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Mar 17, 2023 at 3:16 PM Jeff King <> wrote:
> There's some debugging code in mailmap.c which is only compiled if you
> manually tweak the source to set DEBUG_MAILMAP. When it's not set, the
> fallback noop uses static inline functions; we couldn't use macros here
> because one of the functions is variadic (and variadic macros were
> forbidden back then, but aren't now). As a result, this triggers
> a -Wunused-parameter warning.
> We have a few options here:
>   1. Leave it be. Just mark it as UNUSED, or switch to a variadic macro.
>   2. Assume the debugging code is useful, compile it always, and trigger
>      it with a run-time flag (e.g., with a trace key). This is pretty
>      easy to do, and carries a pretty small runtime cost.
>   3. Assume the debugging is not very useful, and just rip it out. This
>      matches what we did with a similar case in 69c5f17f11 (attr: drop
>      DEBUG_ATTR code, 2022-10-06).
> The debugging flag has been mentioned only three times on the list.
> Once, when it was added in 2009:
> In 2013, when somebody fixed some compilation errors in the conditional
> code (presumably because they used it while making other changes):
> And finally it seemed to have been useful to somebody in 2021:

Nit: s/2021/2020/

> So it's not totally without value. On the other hand, it's not likely to
> be useful to non-developers (and certainly isn't if you have to
> recompile). And using a debugger or adding your own inspection code is
> likely to be as useful. So I've just dropped the code entirely here.
> Note that we do still have to mark a few parameters unused in callback
> functions which are passed to string_list_clear_func(). Those get an
> extra pointer with the string being cleared, which we previously fed to
> the debugging code.
> Signed-off-by: Jeff King <>
> ---
> I'm cc-ing folks from those earlier threads. If somebody really wants to
> salvage it, I can prepare a patch converting it to a trace variable
> instead, but absent any outcry, I'd go with this approach.

As one of the mentioned anonymous "sombody"s, I have no objection.

  reply	other threads:[~2023-03-17 20:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-17 19:13 [PATCH 0/4] more unused-parameter fixes Jeff King
2023-03-17 19:16 ` [PATCH 1/4] mailmap: drop debugging code Jeff King
2023-03-17 20:08   ` Eric Sunshine [this message]
2023-03-17 21:13     ` Jeff King
2023-03-17 19:16 ` [PATCH 2/4] http: drop unused parameter from start_object_request() Jeff King
2023-03-17 19:17 ` [PATCH 3/4] http: mark unused parameter in fill_active_slot() callbacks Jeff King
2023-03-17 19:17 ` [PATCH 4/4] transport: mark unused parameters in fetch_refs_from_bundle() Jeff King
2023-03-17 20:28   ` Junio C Hamano

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:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \

* 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.
Code repositories for project(s) associated with this public inbox

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 read-only IMAP folder(s) and NNTP newsgroup(s).