From f79504994ae210904f5517abe195cccfa44843ba Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Fri, 12 Dec 2025 15:59:38 +0100 Subject: [PATCH] agent: Fix compiler warning when building with clang Fixes: 8b467ad39a76 ("agent: Add option to open socket as specific user") --- src/libstrongswan/plugins/agent/agent_private_key.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libstrongswan/plugins/agent/agent_private_key.c b/src/libstrongswan/plugins/agent/agent_private_key.c index c1d371cb6f..802298cc9b 100644 --- a/src/libstrongswan/plugins/agent/agent_private_key.c +++ b/src/libstrongswan/plugins/agent/agent_private_key.c @@ -188,6 +188,7 @@ static int open_connection(char *path, char *user) close(s); return -1; case 0: + { /* child, do everything manually to avoid interacting with * mutexes etc. that are potentially locked in the parent */ struct passwd *pwp; @@ -209,6 +210,7 @@ static int open_connection(char *path, char *user) } exit(EXIT_FAILURE); /* not reached */ + } default: /* parent */ if (waitpid(pid, &status, 0) == -1 || -- 2.47.3