summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Weingärtner <timo@tiwe.de>2016-10-09 12:31:27 +0200
committerTimo Weingärtner <timo@tiwe.de>2016-10-09 12:31:27 +0200
commitf8e42e89e3404f91d397e325c94af6494786e90f (patch)
tree18de355181aa09282eb37e5fb417092f2ca5c34b
parentd765ef1acb318e1b97481805b66f7b45f8f08f41 (diff)
downloadssh-agent-filter-f8e42e89e3404f91d397e325c94af6494786e90f.tar.gz
avoid warning about unused result of chdir()
-rw-r--r--ssh-agent-filter.C3
1 files changed, 2 insertions, 1 deletions
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<void>(chdir("/"));
int devnull = open("/dev/null", O_RDWR);
dup2(devnull, 0);
dup2(devnull, 1);