From: Junio C Hamano Date: Fri, 06 May 2022 20:22:59 GMT Subject: Re: [PATCH 2/2] http.c: avoid gcc warning Message-ID: In-Reply-To: <3f0e462e86625a3c253653e4a4eefabcd8590bf9.1651859773.git.git@grubix.eu> Michael J Gruber writes: See previous discussion on the topic and help clarify it for me, thanks. https://lore.kernel.org/git/xmqqo8131tr8.fsf@gitster.g/ > Related to -Wdangling-pointer. > > In fact, this use of the pointer looks scary and has not created > problems so far only because the pointer in the struct is not used when > execution is out of the scope of the local function (and the pointer > invalid). > > Signed-off-by: Michael J Gruber > --- > http.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/http.c b/http.c > index 229da4d148..2f67fbb33c 100644 > --- a/http.c > +++ b/http.c > @@ -1367,6 +1367,7 @@ void run_active_slot(struct active_request_slot *slot) > select(max_fd+1, &readfds, &writefds, &excfds, &select_timeout); > } > } > + slot->finished = NULL; > } > > static void release_active_slot(struct active_request_slot *slot)