Git development
 help / color / mirror / Atom feed
* [PATCH] merge-file: fix build warning with gcc 4.8.5
@ 2022-07-29  9:05 Đoàn Trần Công Danh
  2022-07-29 15:48 ` Junio C Hamano
  0 siblings, 1 reply; 11+ messages in thread
From: Đoàn Trần Công Danh @ 2022-07-29  9:05 UTC (permalink / raw)
  To: git; +Cc: Đoàn Trần Công Danh

mmfs is an array of struct, xmparamt_t's first field is a struct,
mmfs's element and xmparamt_t's first field must be initialised
with {0}.

Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
---

 This warning is available in master

 builtin/merge-file.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/builtin/merge-file.c b/builtin/merge-file.c
index c923bbf2ab..607c3d3f9e 100644
--- a/builtin/merge-file.c
+++ b/builtin/merge-file.c
@@ -26,9 +26,9 @@ static int label_cb(const struct option *opt, const char *arg, int unset)
 int cmd_merge_file(int argc, const char **argv, const char *prefix)
 {
 	const char *names[3] = { 0 };
-	mmfile_t mmfs[3] = { 0 };
+	mmfile_t mmfs[3] = { { 0 } };
 	mmbuffer_t result = { 0 };
-	xmparam_t xmp = { 0 };
+	xmparam_t xmp = { { 0 } };
 	int ret = 0, i = 0, to_stdout = 0;
 	int quiet = 0;
 	struct option options[] = {
-- 
2.37.1.560.gdfb9273964


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-07-30 23:50 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-29  9:05 [PATCH] merge-file: fix build warning with gcc 4.8.5 Đoàn Trần Công Danh
2022-07-29 15:48 ` Junio C Hamano
2022-07-29 19:53   ` Jeff King
2022-07-29 19:54     ` Jeff King
2022-07-29 20:48     ` Eric Sunshine
2022-07-29 21:00       ` Jeff King
2022-07-29 21:23         ` Junio C Hamano
2022-07-30  0:19     ` Đoàn Trần Công Danh
2022-07-30  1:40       ` Jeff King
2022-07-30  1:46       ` brian m. carlson
2022-07-30 23:50         ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox