path: root/merge-recursive.c
diff options
authorJunio C Hamano <>2007-10-29 19:00:55 (GMT)
committerJunio C Hamano <>2007-10-29 19:00:55 (GMT)
commitf120ae2a8e8cbe1bcbb2b55ebcd2e1eeb9f03ea2 (patch)
tree32794f4321e119209879ebe14877d4b7dda17a4a /merge-recursive.c
parent7109c889f11b39a2c5a5122e3726be7ffce09faf (diff)
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 <>
Diffstat (limited to 'merge-recursive.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 19d5f3b..c2e1cb6 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -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)) {