Skip to content

Commit

Permalink
merge-recursive.c: mrtree in merge() is not used before set
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
gitster committed Oct 29, 2007
1 parent 7109c88 commit f120ae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion merge-recursive.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit f120ae2

Please sign in to comment.