[PATCH 12/14] rev-list.c: Initialise variables to suppress msvc warnings

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

 



The msvc compiler thinks that two variables could be used
while uninitialised and issues the following warnings:

    ...\git\builtin\rev-list.c(400) : warning C4700: uninitialized \
        local variable 'reaches' used
    ...\git\builtin\rev-list.c(400) : warning C4700: uninitialized \
        local variable 'all' used

In order to suppress the warnings, we simply initialise the
variables to zero.

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

diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index ba27d39..e28695f 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -397,7 +397,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
 		mark_edges_uninteresting(revs.commits, &revs, show_edge);
 
 	if (bisect_list) {
-		int reaches = reaches, all = all;
+		int reaches = 0, all = 0;
 
 		revs.commits = find_bisection(revs.commits, &reaches, &all,
 					      bisect_find_all);
-- 
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]