Thread (63 messages) flat view 63 messages, 6 authors, 2022-07-21

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

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-09-02 14:13:05

On Thu, Sep 02 2021, Johannes Schindelin wrote:
Hi Ævar,

On Wed, 1 Sep 2021, Ævar Arnfjörð Bjarmason wrote:
quoted
On Wed, Sep 01 2021, Johannes Schindelin via GitGitGadget wrote:
quoted
-	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...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help