* [PATCH] submodule--helper: fix build warning with gcc 4.8.5
@ 2022-07-29 9:06 Đoàn Trần Công Danh
0 siblings, 0 replies; only message in thread
From: Đoàn Trần Công Danh @ 2022-07-29 9:06 UTC (permalink / raw)
To: git
Cc: Đoàn Trần Công Danh,
Ævar Arnfjörð Bjarmason
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-29 9:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-29 9:06 [PATCH] submodule--helper: fix build warning with gcc 4.8.5 Đoàn Trần Công Danh
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).