git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 10/14] fast-export.c: Initialise variable to suppress msvc warning
@ 2010-12-04 19:09 Ramsay Jones
  0 siblings, 0 replies; only message in thread
From: Ramsay Jones @ 2010-12-04 19:09 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\builtin\fast-export.c(466) : warning C4700: uninitialized \
        local variable 'commit' used

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

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

diff --git a/builtin/fast-export.c b/builtin/fast-export.c
index c8fd46b..38091fb 100644
--- a/builtin/fast-export.c
+++ b/builtin/fast-export.c
@@ -463,7 +463,7 @@ static void get_tags_and_duplicates(struct object_array *pending,
 	for (i = 0; i < pending->nr; i++) {
 		struct object_array_entry *e = pending->objects + i;
 		unsigned char sha1[20];
-		struct commit *commit = commit;
+		struct commit *commit = NULL;
 		char *full_name;
 
 		if (dwim_ref(e->name, strlen(e->name), sha1, &full_name) != 1)
-- 
1.7.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-12-04 21:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-04 19:09 [PATCH 10/14] fast-export.c: Initialise variable to suppress msvc warning Ramsay Jones

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).