From 0ca46338986becfbbc24160083a9620e8f29a7ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 5 Jan 2024 08:12:32 +0100 Subject: [PATCH] slave: ignore return value of chdir() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's not critical. Fixes ../slave.c: In function ‘slave_spawn’: ../slave.c:410:9: error: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result] 410 | chdir("/"); | ^~~~~~~~~~ --- slave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slave.c b/slave.c index 1184d0c2..0cf64fa0 100644 --- a/slave.c +++ b/slave.c @@ -407,7 +407,7 @@ slave_spawn(int ptmx, int argc, const char *cwd, char *const *argv, * example, it may be a mount point of, say, a thumb drive. Us * keeping it open will prevent the user from unmounting it. */ - chdir("/"); + (void)!!chdir("/"); close(fork_pipe[1]); /* Close write end */ LOG_DBG("slave has PID %d", pid);