git.ckatri.com
/
cgit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7669f7f
)
ui-shared: squelch compiler warning.
author
Jason A. Donenfeld
<Jason@zx2c4.com>
Wed, 20 Mar 2013 19:43:13 +0000
(20:43 +0100)
committer
Jason A. Donenfeld
<Jason@zx2c4.com>
Wed, 20 Mar 2013 20:08:32 +0000
(21:08 +0100)
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
patch
|
blob
|
history
diff --git
a/ui-shared.c
b/ui-shared.c
index 968933fe5e7dc1f7e2673aefe88df80fded519e6..d4fb3d9e869139296f5e776bee1466d63dfc5158 100644
(file)
--- a/
ui-shared.c
+++ b/
ui-shared.c
@@
-523,6
+523,7
@@
void cgit_submodule_link(const char *class, char *path, const char *rev)
char tail, *dir;
size_t len;
+ len = 0;
tail = 0;
list = &ctx.repo->submodules;
item = lookup_path(list, path);