cgit

commit 40e1d9b6177558bf4069c09ca6d8e3a682baa988

Author: Jason A. Donenfeld <Jason@zx2c4.com>

ui-shared: squelch compiler warning.

Since tail is initialized to 0, we will never get a warning on the last
if statement, but recent gcc complains anyway. So, we initialize len as
well. Future gcc versions should be able to optimize this out anyway.

 ui-shared.c | 1 +


diff --git a/ui-shared.c b/ui-shared.c
index 968933fe5e7dc1f7e2673aefe88df80fded519e6..d4fb3d9e869139296f5e776bee1466d63dfc5158 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -523,6 +523,7 @@ 	struct string_list_item *item;
 	char tail, *dir;
 	size_t len;
 
+	len = 0;
 	tail = 0;
 	list = &ctx.repo->submodules;
 	item = lookup_path(list, path);