Skip to content

Commit f120ae2

Browse files
committed
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 <[email protected]>
1 parent 7109c88 commit f120ae2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

merge-recursive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,7 @@ static int merge(struct commit *h1,
15861586
{
15871587
struct commit_list *iter;
15881588
struct commit *merged_common_ancestors;
1589-
struct tree *mrtree;
1589+
struct tree *mrtree = mrtree;
15901590
int clean;
15911591

15921592
if (show(4)) {

0 commit comments

Comments
 (0)