From e57ec32e0564e45ece88914625f0d0bd04d5fe85 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Sat, 2 Aug 2025 13:53:55 +1000 Subject: [PATCH] Remove initialisation of unions As of gcc-15, unions are no longer zero initialised when "{0}" is used. To revert to the old behaviour, either assumes building for C23 or adding a compiler option that may or may not work with other compilers. Remove current "initialization" to make it clear that full initialization is not occuring. All relevant fields are currently initialized before use. Signed-off-by: Allan McRae --- lib/libalpm/dload.c | 2 +- lib/libalpm/sync.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libalpm/dload.c b/lib/libalpm/dload.c index c35faee1..83efdba8 100644 --- a/lib/libalpm/dload.c +++ b/lib/libalpm/dload.c @@ -1322,7 +1322,7 @@ int SYMEXPORT alpm_fetch_pkgurl(alpm_handle_t *handle, const alpm_list_t *urls, char *temporary_cachedir = NULL; alpm_list_t *payloads = NULL; const alpm_list_t *i; - alpm_event_t event = {0}; + alpm_event_t event; CHECK_HANDLE(handle, return -1); ASSERT(*fetched == NULL, RET_ERR(handle, ALPM_ERR_WRONG_ARGS, -1)); diff --git a/lib/libalpm/sync.c b/lib/libalpm/sync.c index 087c48de..cceb8488 100644 --- a/lib/libalpm/sync.c +++ b/lib/libalpm/sync.c @@ -776,7 +776,7 @@ static int download_files(alpm_handle_t *handle) char * temporary_cachedir = NULL; alpm_list_t *i, *files = NULL; int ret = 0; - alpm_event_t event = {0}; + alpm_event_t event; alpm_list_t *payloads = NULL; cachedir = _alpm_filecache_setup(handle);