From 9fe604df1a78fac335172f1fdd38ace314b2ba94 Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Mon, 29 Sep 2025 17:53:56 +0100 Subject: [PATCH] Move the declaration of changes_made outside the conditional, so as to not break on macOS. --- src/pv/watchpid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pv/watchpid.c b/src/pv/watchpid.c index 77fed08..2923e67 100644 --- a/src/pv/watchpid.c +++ b/src/pv/watchpid.c @@ -429,6 +429,7 @@ int pv_watchpid_scanfds(pvstate_t state, pid_t watch_pid, int watch_fd, int *arr { int array_length = 0; struct pvwatchfd_s *info_array = NULL; + bool changes_made; #ifdef __APPLE__ struct proc_fdinfo *fd_infos = NULL; @@ -442,7 +443,6 @@ int pv_watchpid_scanfds(pvstate_t state, pid_t watch_pid, int watch_fd, int *arr char fd_dir[512]; /* flawfinder: ignore - zeroed, bounded with pv_snprintf(). */ DIR *dptr; struct dirent *d; - bool changes_made; memset(fd_dir, 0, sizeof(fd_dir)); (void) pv_snprintf(fd_dir, sizeof(fd_dir), "/proc/%u/fd", watch_pid);