git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] unpack-objects: fix build warning with gcc 4.8.5

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Jul 29, 2022, 09:06 UTC
Message-ID
<dfb9273964a6226472316bedf188de63169fb45c.1659084815.git.congdanhqx@gmail.com>

git_zstream's first field is a struct (z_stream), it must be initialised with {0}.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---
 Cc: Han Xin <hanxin.hx@alibaba-inc.com>
 Fix for hx/unpack-streaming (merged to next)
 Please feel free to squash into it.
 builtin/unpack-objects.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/unpack-objects.c b/builtin/unpack-objects.c
index 43789b8ef2..4b16f1592b 100644
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
@@ -385,7 +385,7 @@ static const void *feed_input_zstream(struct input_stream *in_stream,
 
 static void stream_blob(unsigned long size, unsigned nr)
 {
-	git_zstream zstream = { 0 };
+	git_zstream zstream = { { 0 } };
 	struct input_zstream_data data = { 0 };
 	struct input_stream in_stream = {
 		.read = feed_input_zstream,
-- 
2.37.1.560.gdfb9273964
Message 1 of 1 in “unpack-objects: fix build warning with gcc 4.8.5”
  1. unpack-objects: fix build warning with gcc 4.8.5Đoàn Trần Công Danh, Jul 29, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.