git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>
To: git@vger.kernel.org
Cc: "Đoàn Trần Công Danh" <congdanhqx@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH] submodule--helper: fix build warning with gcc 4.8.5
Date: Fri, 29 Jul 2022 16:06:23 +0700	[thread overview]
Message-ID: <2466aa5019bd950df4b77d24182f1ec848069d1b.1659085438.git.congdanhqx@gmail.com> (raw)

list_objects_filter_options's first field is a struct, it must
be initialised with {0}.

Fix: 3851346be5, (submodule--helper: replace memset() with { 0 }-initialization, 2022-07-28)

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

Cc: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
for-branch: ab/submodule-helper-prep and seen

Feel free to squash in

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

diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c
index a3e00c9929..8285c69bde 100644
--- a/builtin/submodule--helper.c
+++ b/builtin/submodule--helper.c
@@ -1727,7 +1727,7 @@ static int module_clone(int argc, const char **argv, const char *prefix)
 {
 	int dissociate = 0, quiet = 0, progress = 0, require_init = 0;
 	struct module_clone_data clone_data = MODULE_CLONE_DATA_INIT;
-	struct list_objects_filter_options filter_options = { 0 };
+	struct list_objects_filter_options filter_options = { { 0 } };
 	struct string_list reference = STRING_LIST_INIT_NODUP;
 	struct option module_clone_options[] = {
 		OPT_STRING(0, "prefix", &clone_data.prefix,
@@ -2595,7 +2595,7 @@ static int module_update(int argc, const char **argv, const char *prefix)
 	struct pathspec pathspec = { 0 };
 	struct pathspec pathspec2 = { 0 };
 	struct update_data opt = UPDATE_DATA_INIT;
-	struct list_objects_filter_options filter_options = { 0 };
+	struct list_objects_filter_options filter_options = { { 0 } };
 	int ret;
 	struct option module_update_options[] = {
 		OPT__FORCE(&opt.force, N_("force checkout updates"), 0),
-- 
2.37.1.560.gdfb9273964


                 reply	other threads:[~2022-07-29  9:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2466aa5019bd950df4b77d24182f1ec848069d1b.1659085438.git.congdanhqx@gmail.com \
    --to=congdanhqx@gmail.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).