diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-03-21 04:43:13 (JST) |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2013-03-21 05:08:32 (JST) |
commit | 40e1d9b6177558bf4069c09ca6d8e3a682baa988 (patch) | |
tree | 5c32c6ff69cbae17b61cca3d29ed7caf05f63801 /ui-shared.c | |
parent | 7669f7f73082ce9eb1aef28495773492cc5bec90 (diff) | |
download | cgit-40e1d9b6177558bf4069c09ca6d8e3a682baa988.zip cgit-40e1d9b6177558bf4069c09ca6d8e3a682baa988.tar.gz |
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.
Diffstat (limited to 'ui-shared.c')
-rw-r--r-- | ui-shared.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index 968933f..d4fb3d9 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -523,6 +523,7 @@ void cgit_submodule_link(const char *class, char *path, const char *rev) | |||
523 | char tail, *dir; | 523 | char tail, *dir; |
524 | size_t len; | 524 | size_t len; |
525 | 525 | ||
526 | len = 0; | ||
526 | tail = 0; | 527 | tail = 0; |
527 | list = &ctx.repo->submodules; | 528 | list = &ctx.repo->submodules; |
528 | item = lookup_path(list, path); | 529 | item = lookup_path(list, path); |