From e370b85599468cc3fd632f5a01adc3a162d54d5a Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Thu, 28 Dec 2017 01:48:44 +0100 Subject: =?UTF-8?q?Fix=20build=20warnings:=20ignoring=20return=20value=20o?= =?UTF-8?q?f=20=E2=80=98chdir=E2=80=99,?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit declared with attribute warn_unused_result --- src/terminal-screen.c | 3 ++- src/terminal.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/terminal-screen.c b/src/terminal-screen.c index 6c5a4f7..3d741da 100644 --- a/src/terminal-screen.c +++ b/src/terminal-screen.c @@ -230,7 +230,8 @@ cwd_of_pid (int pid) if (chdir (cwd_file) == 0) { working_dir = g_get_current_dir (); - (void) chdir (cwd); + if (chdir (cwd) < 0) + g_warning ("Could not change working directory."); } g_free (cwd); } diff --git a/src/terminal.c b/src/terminal.c index 81aab2d..401af42 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -563,7 +563,8 @@ main (int argc, char **argv) */ home_dir = g_get_home_dir (); if (home_dir == NULL || chdir (home_dir) < 0) - (void) chdir ("/"); + if (chdir ("/") < 0) + g_warning ("Could not change working directory."); options = terminal_options_parse (working_directory, NULL, -- cgit v1.2.1