diff options
author | Ondrej Holy <oholy@redhat.com> | 2018-05-10 11:20:46 +0200 |
---|---|---|
committer | Ondrej Holy <oholy@redhat.com> | 2018-05-10 11:22:21 +0200 |
commit | 31c0fcbf8ae8339c1f18c1a4f54020a93ff1d9e1 (patch) | |
tree | 14a7580091235413b1534b1c92d420723c99d491 | |
parent | 6d711c07cbd00768c6b2b468f3100f02afc58f6f (diff) | |
download | gvfs-31c0fcbf8ae8339c1f18c1a4f54020a93ff1d9e1.tar.gz |
pty_open: Prevent build warnings
Prevent the following build warning which is shown in some cases:
warning: ignoring return value of 'chdir', declared with attribute
warn_unused_result [-Wunused-result]
-rw-r--r-- | daemon/pty_open.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/daemon/pty_open.c b/daemon/pty_open.c index e0402d88..5d146a13 100644 --- a/daemon/pty_open.c +++ b/daemon/pty_open.c @@ -355,7 +355,9 @@ _pty_run_on_pty(int fd, gboolean login, /* Change to the requested directory. */ if (directory != NULL) { - chdir(directory); + if (chdir(directory) == -1) { + g_warning ("Error changing directory."); + } } #ifdef HAVE_UTMP_H |