{"thread":{"id":"25956","subject":"[PATCH 08/14] submodule.c: Initialise variables to suppress msvc warnings","startedAt":"2010-12-04T19:07:32Z","lastAt":"2010-12-04T19:07:32Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":14},"messages":[{"id":"157313","messageId":"4CFA9174.6060507@ramsay1.demon.co.uk","threadId":"25956","inReplyTo":null,"subject":"[PATCH 08/14] submodule.c: Initialise variables to suppress msvc warnings","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2010-12-04T19:07:32Z","receivedAt":"2010-12-04T19:07:32Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nThe msvc compiler thinks that two variables could be used\nwhile uninitialised and issues the following warnings:\n\n    ...\\git\\submodule.c(147) : warning C4700: uninitialized local \\\n        variable 'left' used\n    ...\\git\\submodule.c(147) : warning C4700: uninitialized local \\\n        variable 'right' used\n\nIn order to suppress the warnings, we simply initialise the\npointer variables to NULL.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n submodule.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/submodule.c b/submodule.c\nindex 91a4758..eef498a 100644\n--- a/submodule.c\n+++ b/submodule.c\n@@ -144,7 +144,7 @@ void show_submodule_summary(FILE *f, const char *path,\n \t\tconst char *del, const char *add, const char *reset)\n {\n \tstruct rev_info rev;\n-\tstruct commit *commit, *left = left, *right = right;\n+\tstruct commit *commit, *left = NULL, *right = NULL;\n \tstruct commit_list *merge_bases, *list;\n \tconst char *message = NULL;\n \tstruct strbuf sb = STRBUF_INIT;\n-- \n1.7.3\n"}]}