about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2013-03-20 20:43:13 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2013-03-20 21:08:32 +0100
commit40e1d9b6177558bf4069c09ca6d8e3a682baa988 (patch)
tree5c32c6ff69cbae17b61cca3d29ed7caf05f63801
parentcgit.mk: Use SHELL_PATH_SQ to run gen-version.sh (diff)
downloadcgit-pink-40e1d9b6177558bf4069c09ca6d8e3a682baa988.tar.gz
cgit-pink-40e1d9b6177558bf4069c09ca6d8e3a682baa988.zip
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.
-rw-r--r--ui-shared.c1
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)
 	char tail, *dir;
 	size_t len;
 
+	len = 0;
 	tail = 0;
 	list = &ctx.repo->submodules;
 	item = lookup_path(list, path);
/td>Add photos from September 29June McEnroe 2024-10-07Add photos from September 28June McEnroe 2024-10-07Add photos from September 22June McEnroe 2024-09-25Add photos from September 15June McEnroe 2024-09-24Add photos from September 14June McEnroe 2024-09-24Add photos from September 12June McEnroe 2024-09-24Add photos from September 7June McEnroe 2024-09-24Allow not having descriptionsJune McEnroe 2024-09-23Automatically select the last used lens for a bodyJune McEnroe 2024-09-19Add photos from September 5June McEnroe 2024-09-15Add some more film stocks to the listJune McEnroe 2024-09-13Add photos from September 2June McEnroe 2024-09-13Add Fomapan 200 to films listJune McEnroe 2024-09-10Add August 29 picnic photosJune McEnroe 2024-09-08Apply some bold to trips renderingJune McEnroe 2024-09-08Render trips hopefully more efficientlyJune McEnroe 2024-09-08Allow removing bodies and lensesJune McEnroe 2024-09-08Limit body width so it looks less silly on desktopJune McEnroe 2024-09-07Handle no film being loadedJune McEnroe 2024-09-07Fancy up the text a littleJune McEnroe