Re: [PATCH 2/2] config.mak.dev: alternative workaround to gcc 12 warning in http.c
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Apr 16, 2022, 01:08 UTC
- Message-ID
- <220416.86pmlhaktz.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <CAPUEspj4zu-59qxoVPMDGwMvWmu977WRDe7=t0if7raz=H24AQ@mail.gmail.com>
On Fri, Apr 15 2022, Carlo Arenas wrote:
Show 22 quoted lines
> On Fri, Apr 15, 2022 at 4:34 PM Junio C Hamano <gitster@pobox.com> wrote: >> diff --git c/http.c w/http.c >> index 229da4d148..85437b1980 100644 >> --- c/http.c >> +++ w/http.c >> @@ -1367,6 +1367,9 @@ void run_active_slot(struct active_request_slot *slot) >> select(max_fd+1, &readfds, &writefds, &excfds, &select_timeout); >> } >> } >> + >> + if (slot->finished == &finished) >> + slot->finished = NULL; >> } >> >> static void release_active_slot(struct active_request_slot *slot) > > this would be IMHO a better fix than the one currently queued in > ab/http-gcc-12-workaround and indeed squashes the warning with the gcc > 12 version that is likely to be released with Fedora 36, but notice > that it was proposed before[1] and apparently didn't work with the > version of the compiler that Ævar was using at that time, as > documented in the commit message.
Does it suppress the warning on your GCCv12? It doesn't on mine, as noted later in related threads my "yes, that does quiet it" in [1] is a misreport. That doesn't suppress the warning (the [2] patch notes it.
1. https://lore.kernel.org/git/220127.86mtjhdeme.gmgdl@evledraar.gmail.com/ 2. https://lore.kernel.org/git/patch-v3-1.1-69190804c67-20220325T143322Z-avarab@gmail.com/