diff mbox series

submodule--helper: fix build warning with gcc 4.8.5

Message ID 2466aa5019bd950df4b77d24182f1ec848069d1b.1659085438.git.congdanhqx@gmail.com (mailing list archive)
State New, archived
Headers show
Series submodule--helper: fix build warning with gcc 4.8.5 | expand

Commit Message

Đoàn Trần Công Danh July 29, 2022, 9:06 a.m. UTC
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 mbox series

Patch

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),