[PATCH 09/14] merge-recursive.c: Initialise variable to suppress msvc warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The msvc compiler thinks a variable could be used while
uninitialised and issues the following warning:

    ...\git\merge-recursive.c(1599) : warning C4700: uninitialized local \
        variable 'mrtree' used

In order to suppress the warning we simply initialise the mrtree
pointer variable to NULL.

Signed-off-by: Ramsay Jones <ramsay@xxxxxxxxxxxxxxxxxxx>
---
 merge-recursive.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/merge-recursive.c b/merge-recursive.c
index 16c2dbe..d5423ad 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -1596,7 +1596,7 @@ int merge_recursive(struct merge_options *o,
 {
 	struct commit_list *iter;
 	struct commit *merged_common_ancestors;
-	struct tree *mrtree = mrtree;
+	struct tree *mrtree = NULL;
 	int clean;
 
 	if (show(o, 4)) {
-- 
1.7.3


--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]