[PATCH] ui-snapshot.c: Terminate cgit_snapshot_formats[] properly

Lukas Fleischer cgit at cryptocrack.de
Sun Mar 3 23:09:01 CET 2013


Explicitly set the suffix field of the terminating format entry to 0.
This fixes a GCC warning seen with "-Wmissing-field-initializers".

Signed-off-by: Lukas Fleischer <cgit at cryptocrack.de>
---
 ui-snapshot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui-snapshot.c b/ui-snapshot.c
index 47432bd..e740645 100644
--- a/ui-snapshot.c
+++ b/ui-snapshot.c
@@ -48,7 +48,7 @@ const struct cgit_snapshot_format cgit_snapshot_formats[] = {
 	{ ".tar.bz2", "application/x-bzip2", write_tar_bzip2_archive, 0x04 },
 	{ ".tar", "application/x-tar", write_tar_archive, 0x08 },
 	{ ".tar.xz", "application/x-xz", write_tar_xz_archive, 0x10 },
-	{}
+	{ 0 }
 };
 
 static const struct cgit_snapshot_format *get_format(const char *filename)
-- 
1.8.2.rc0.247.g811e0c0





More information about the CGit mailing list