[PATCH 3/6] diff --submodule: suppress -Wuninitialized warning by initializing to NULL
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
submodule.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/submodule.c b/submodule.c
index dcbb2d3..a7a7203 100644
--- a/submodule.c
+++ b/submodule.c
@@ -158,7 +158,7 @@ void show_submodule_summary(FILE *f, const char *path,
const char *del, const char *add, const char *reset)
{
struct rev_info rev;
- struct commit *commit, *left, *right;
+ struct commit *commit, *left = NULL, *right = NULL;
struct commit_list *merge_bases, *list;
const char *message = NULL;
struct strbuf sb = STRBUF_INIT;
--
1.7.4.1