Re: [PATCH] Fix an unitialized pointer in merge-recursive.c
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 16, 2007, 08:08 UTC
- Message-ID
- <7vsl6jkila.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <e5bfff550708160100t5aa93430x6cbe83e6e7a61d73@mail.gmail.com>
"Marco Costalba" <mcostalba@gmail.com> writes:
Show 5 quoted lines
> Indeed &mrtree is passed to merge_trees() that not always > seems to set the value, so on some paths mrtree could > return uninitialized. > > Spotted by a gcc 4.2.1 warning
Are you sure that gcc is correctly seeing the codeflow?
In merge(), mrtree is used only under index_only, and merge_trees() always sets *result under index_only.