jc/http-clear-finished-pointer (was: What's cooking in git.git (May 2022, #07; Wed, 25))
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- May 26, 2022, 18:51 UTC
- Message-ID
- <220526.86v8ts3z2k.gmgdl@evledraar.gmail.com>
- In-Reply-To
- <xmqqzgj41ya2.fsf@gitster.g>
On Thu, May 26 2022, Junio C Hamano wrote:
Show 7 quoted lines
> * jc/http-clear-finished-pointer (2022-05-24) 1 commit > - http.c: clear the 'finished' member once we are done with it > > Meant to go with js/ci-gcc-12-fixes > > Will merge to 'next'? > source: <xmqqczgqjr8y.fsf_-_@gitster.g>
The end of the proposed commit message says:
[...]Clear the finished member before the control leaves the
function, which has a side effect of unconfusing compilers like
recent GCC 12 that is over-eager to warn against such an assignment.I cannot reproduce this suppressing the warning as noted in past exchanges, it's not affected by this "clear if we set it" pattern. It needs to be unconditionally cleared.
So I don't think this actively makes anything worse, but I don't think it's doing what you're expecting it to do either.