[PATCH] submodule--helper: fix build warning with gcc 4.8.5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---

Cc: Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx>
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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux