public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Sven Strickroth <sven@cs-ware•de>
To: git@vger•kernel.org
Cc: Junio C Hamano <gitster@pobox•com>
Subject: [PATCH 3/3] Initialize variables with values
Date: Thu, 09 May 2013 03:13:39 +0200	[thread overview]
Message-ID: <518AF843.6040501@cs-ware.de> (raw)
In-Reply-To: <518AF79A.5000408@cs-ware.de>

With MSVC initializing a variable with "int a=a" causes a warning about
using an uninitialized value.

Signed-off-by: Sven Strickroth <email@cs-ware•de>
---
 builtin/rev-list.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/rev-list.c b/builtin/rev-list.c
index 67701be..13afacd 100644
--- a/builtin/rev-list.c
+++ b/builtin/rev-list.c
@@ -338,7 +338,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);
-- 
Best regards,
 Sven Strickroth
 PGP key id F5A9D4C4 @ any key-server

  parent reply	other threads:[~2013-05-09  1:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-09  1:10 [PATCH 0/3] MSVC fixes Sven Strickroth
2013-05-09  1:12 ` [PATCH 1/3] poll.h lies in the same folder, so use normal quotes for include Sven Strickroth
2013-05-09  1:31   ` Sven Strickroth
2013-05-09  1:13 ` [PATCH 2/3] mingw.h: Define only if necessary Sven Strickroth
2013-05-09  1:13 ` Sven Strickroth [this message]
2013-05-09 12:40   ` [PATCH 3/3] Initialize variables with values Krzysztof Mazur
2013-05-09 13:21   ` Jonathan Nieder
2013-05-09 13:49     ` Sven Strickroth
2013-05-09 14:32     ` René Scharfe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=518AF843.6040501@cs-ware.de \
    --to=sven@cs-ware$(echo .)de \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox