Subject: Re: [PATCH v2 5/7] rebase: drop support for `--preserve-merges`

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Thu, 02 Sep 2021 16:11:09 +0200

On Thu, Sep 02 2021, Johannes Schindelin wrote:

> Hi Ævar,
>
> On Wed, 1 Sep 2021, Ævar Arnfjörð Bjarmason wrote:
>
>>
>> On Wed, Sep 01 2021, Johannes Schindelin via GitGitGadget wrote:
>>
>> > -	struct strbuf script_snippet = STRBUF_INIT, buf = STRBUF_INIT;
>> > +	struct strbuf script_snippet = STRBUF_INIT;
>>
>> You end up removing all uses of script_snippet except the
>> strbuf_release() for it, so this & that can be removed too.
>
> Valid point, I missed it because compiling with `DEVELOPER=1` did not
> complain (because `strbuf_release()` "uses" the variable).

As an aside I was looking the other day to see if some variant of
-Wunused was smart enough to exclude (preferably a configurable) list of
functions. E.g.:

    void *some_var = malloc(123);
    free(some_var);

Could be unused if something was smart to see that a thing only
interacting with "malloc" and "free" wasn't otherwise used, and likewise
we could add "strbuf_release" and other such free() functions to such a
list.

But I didn't find anything...