From f8e42e89e3404f91d397e325c94af6494786e90f Mon Sep 17 00:00:00 2001 From: Timo Weingärtner Date: Sun, 9 Oct 2016 12:31:27 +0200 Subject: avoid warning about unused result of chdir() --- ssh-agent-filter.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index 2878678..cbf5f45 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -543,8 +543,9 @@ int main (int const argc, char const * const * const argv) { exit(EX_OK); } + // the following stuff is optional, so we don't do error checking setsid(); - chdir("/"); + static_cast(chdir("/")); int devnull = open("/dev/null", O_RDWR); dup2(devnull, 0); dup2(devnull, 1); -- cgit v1.2.3