@matheusbsbs / matheus-bagliano / commits / 75b9a8a6d5
Fork 0

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 <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

David Aguilar committed Nov 20, 2009 at 03:33 UTC 75b9a8a6d5aee29b1d0d03935531081e6180c0db
1 file changed +1 -1
submodule.c
+1 -1
@@ -38,7 +38,7 @@ void show_submodule_summary(FILE *f, const char *path,
38 const char *del, const char *add, const char *reset)
39 {
40 struct rev_info rev;
41 - struct commit *commit, *left = left, *right;
41 + struct commit *commit, *left = left, *right = right;
42 struct commit_list *merge_bases, *list;
43 const char *message = NULL;
44 struct strbuf sb = STRBUF_INIT;