{"thread":{"id":"25965","subject":"[PATCH 10/14] fast-export.c: Initialise variable to suppress msvc warning","startedAt":"2010-12-04T19:09:15Z","lastAt":"2010-12-04T19:09:15Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":14},"messages":[{"id":"157326","messageId":"4CFA91DB.6030304@ramsay1.demon.co.uk","threadId":"25965","inReplyTo":null,"subject":"[PATCH 10/14] fast-export.c: Initialise variable to suppress msvc warning","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2010-12-04T19:09:15Z","receivedAt":"2010-12-04T19:09:15Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nThe msvc compiler thinks that a variable could be used while\nuninitialised and issues the following warning:\n\n    ...\\git\\builtin\\fast-export.c(466) : warning C4700: uninitialized \\\n        local variable 'commit' used\n\nIn order to suppress the warning, we simply initialise the\ncommit pointer variable to NULL.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n builtin/fast-export.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/builtin/fast-export.c b/builtin/fast-export.c\nindex c8fd46b..38091fb 100644\n--- a/builtin/fast-export.c\n+++ b/builtin/fast-export.c\n@@ -463,7 +463,7 @@ static void get_tags_and_duplicates(struct object_array *pending,\n \tfor (i = 0; i < pending->nr; i++) {\n \t\tstruct object_array_entry *e = pending->objects + i;\n \t\tunsigned char sha1[20];\n-\t\tstruct commit *commit = commit;\n+\t\tstruct commit *commit = NULL;\n \t\tchar *full_name;\n \n \t\tif (dwim_ref(e->name, strlen(e->name), sha1, &full_name) != 1)\n-- \n1.7.3\n"}]}