From 3e8cb61a7956e658dc2ea394e6177c75f59fb75d Mon Sep 17 00:00:00 2001 From: Sascha Wessel Date: Thu, 11 Dec 2008 12:45:54 +0100 Subject: [PATCH] Fixed compilation warning: MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit ignoring return value of ‘chdir’, declared with attribute warn_unused_result --- ChangeLog | 4 ++++ fso-gpsd.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d5453b6..533d691 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +fso-gpsd 0.9 + * Fixed compilation warning: ignoring return value of ‘chdir’, + declared with attribute warn_unused_result + fso-gpsd 0.8 - 2008-12-06 * Improved logging * Optimization diff --git a/fso-gpsd.c b/fso-gpsd.c index d105c8f..53e3cb6 100644 --- a/fso-gpsd.c +++ b/fso-gpsd.c @@ -2465,7 +2465,10 @@ main(int argc, char **argv) background = TRUE; setsid(); - chdir("/"); + + if (chdir("/")) { + ERROR("Cannot chdir: /: %s", strerror(errno)); + } fd = open("/dev/null", O_RDWR, 0); -- 2.11.4.GIT