From fb2273df78829c8a12e554f4f2f9acac43f8a5d6 Mon Sep 17 00:00:00 2001 From: Mauro Rossi Date: Sat, 18 Oct 2025 12:00:15 +0200 Subject: [PATCH] util: Fix gnu-empty-initializer error Fixes the following building error happening with clang: ../src/util/os_file.c:291:29: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer] struct epoll_event evt = {}; ^ 1 error generated. Fixes: 17e28652 ("util: mimic KCMP_FILE via epoll when KCMP is missing") Cc: "25.3" Reviewed-by: Pierre-Eric Pelloux-Prayer (cherry picked from commit 7bbbfa667036e6d495c88665bdc851623903753a) Part-of: --- .pick_status.json | 2 +- src/util/os_file.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 32bf45c1de5..e0f84ed7673 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -454,7 +454,7 @@ "description": "util: Fix gnu-empty-initializer error", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "17e286529b978de95052ec86874f8f76417780b2", "notes": null diff --git a/src/util/os_file.c b/src/util/os_file.c index 6336941c7f4..7d99383e8b7 100644 --- a/src/util/os_file.c +++ b/src/util/os_file.c @@ -288,7 +288,7 @@ os_same_file_description(int fd1, int fd2) if (efd < 0) return -1; - struct epoll_event evt = {}; + struct epoll_event evt = {0}; /* Get a new file descriptor number for fd1. */ int tmp = os_dupfd_cloexec(fd1); /* Add it to evt. */