merge-recursive.c: mrtree in merge() is not used before set

The called function merge_trees() sets its *result, to which the
address of the variable mrtree in merge() function is passed,
only when index_only is set.  But that is Ok as the function
uses the value in the variable only under index_only iteration.

However, recent gcc does not realize this.  Work it around by
adding a fake initializer.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2007-10-29 12:00:55 -07:00
parent 7109c889f1
commit f120ae2a8e

View file

@ -1586,7 +1586,7 @@ static int merge(struct commit *h1,
{
struct commit_list *iter;
struct commit *merged_common_ancestors;
struct tree *mrtree;
struct tree *mrtree = mrtree;
int clean;
if (show(4)) {