From: David Aguilar Date: Fri, 20 Nov 2009 11:33:53 +0000 (-0800) Subject: submodule.c: Squelch a "use before assignment" warning X-Git-Tag: v1.6.6-rc0~37 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=75b9a8a6d5aee29b1d0d03935531081e6180c0db;p=git.git submodule.c: Squelch a "use before assignment" warning i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493) compiler (and probably others) mistakenly thinks variable 'right' is used before assigned. Work around it by giving it a fake initialization. Signed-off-by: David Aguilar Signed-off-by: Junio C Hamano --- diff --git a/submodule.c b/submodule.c index 461faf0e0..86aad653b 100644 --- a/submodule.c +++ b/submodule.c @@ -38,7 +38,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 = left, *right; + struct commit *commit, *left = left, *right = right; struct commit_list *merge_bases, *list; const char *message = NULL; struct strbuf sb = STRBUF_INIT;