{"thread":{"id":"58238","subject":"[PATCH] submodule--helper: fix build warning with gcc 4.8.5","startedAt":"2022-07-29T09:06:37Z","lastAt":"2022-07-29T09:06:37Z","messageCount":1,"participants":["Đoàn Trần Công Danh"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"460191","messageId":"2466aa5019bd950df4b77d24182f1ec848069d1b.1659085438.git.congdanhqx@gmail.com","threadId":"58238","inReplyTo":null,"subject":"[PATCH] submodule--helper: fix build warning with gcc 4.8.5","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2022-07-29T09:06:23Z","receivedAt":"2022-07-29T09:06:37Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"list_objects_filter_options's first field is a struct, it must\nbe initialised with {0}.\n\nFix: 3851346be5, (submodule--helper: replace memset() with { 0 }-initialization, 2022-07-28)\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n\nCc: Ævar Arnfjörð Bjarmason <avarab@gmail.com>\nfor-branch: ab/submodule-helper-prep and seen\n\nFeel free to squash in\n\n builtin/submodule--helper.c | 4 ++--\n 1 file changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c\nindex a3e00c9929..8285c69bde 100644\n--- a/builtin/submodule--helper.c\n+++ b/builtin/submodule--helper.c\n@@ -1727,7 +1727,7 @@ static int module_clone(int argc, const char **argv, const char *prefix)\n {\n \tint dissociate = 0, quiet = 0, progress = 0, require_init = 0;\n \tstruct module_clone_data clone_data = MODULE_CLONE_DATA_INIT;\n-\tstruct list_objects_filter_options filter_options = { 0 };\n+\tstruct list_objects_filter_options filter_options = { { 0 } };\n \tstruct string_list reference = STRING_LIST_INIT_NODUP;\n \tstruct option module_clone_options[] = {\n \t\tOPT_STRING(0, \"prefix\", &clone_data.prefix,\n@@ -2595,7 +2595,7 @@ static int module_update(int argc, const char **argv, const char *prefix)\n \tstruct pathspec pathspec = { 0 };\n \tstruct pathspec pathspec2 = { 0 };\n \tstruct update_data opt = UPDATE_DATA_INIT;\n-\tstruct list_objects_filter_options filter_options = { 0 };\n+\tstruct list_objects_filter_options filter_options = { { 0 } };\n \tint ret;\n \tstruct option module_update_options[] = {\n \t\tOPT__FORCE(&opt.force, N_(\"force checkout updates\"), 0),\n-- \n2.37.1.560.gdfb9273964\n\n"}]}