git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 14/14] wt-status.c: Initialise variable to suppress msvc warning
@ 2010-12-04 19:12 Ramsay Jones
  2010-12-04 20:52 ` Jonathan Nieder
  0 siblings, 1 reply; 8+ messages in thread
From: Ramsay Jones @ 2010-12-04 19:12 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Johannes Sixt, GIT Mailing-list


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

    ...\git\wt-status.c(152) : warning C4700: uninitialized local \
        variable 'status' used

In order to suppress the warning, we simply initialise the
variable to zero.

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 wt-status.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/wt-status.c b/wt-status.c
index d9f3d9f..9b4b5bf 100644
--- a/wt-status.c
+++ b/wt-status.c
@@ -149,7 +149,7 @@ static void wt_status_print_change_data(struct wt_status *s,
 {
 	struct wt_status_change_data *d = it->util;
 	const char *c = color(change_type, s);
-	int status = status;
+	int status = 0;
 	char *one_name;
 	char *two_name;
 	const char *one, *two;
-- 
1.7.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-12-10 15:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-04 19:12 [PATCH 14/14] wt-status.c: Initialise variable to suppress msvc warning Ramsay Jones
2010-12-04 20:52 ` Jonathan Nieder
2010-12-09 18:17   ` Ramsay Jones
2010-12-09 19:08     ` Junio C Hamano
2010-12-09 19:46       ` Erik Faye-Lund
2010-12-10 13:35         ` Sebastian Schuberth
2010-12-10 15:05           ` Erik Faye-Lund
2010-12-10 15:43             ` Sebastian Schuberth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).