From 952a0fe4afb455c8d719eb920b9e3983405af3ec Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 6 Jan 2015 18:32:58 +0100 Subject: [PATCH 1/1] Silence a gcc warning. Unfortunately, casting the return value to void is not enough to make the warning go away, at least on Ubuntu systems. --- fsck.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fsck.c b/fsck.c index ce8f1dc..9701f27 100644 --- a/fsck.c +++ b/fsck.c @@ -279,9 +279,10 @@ static int fsck_opendir(const char *dirname, DIR **dir, int *cwd) if (*dir) return 1; ret = errno == EACCES? -E_FSCK_ACCESS : -E_FSCK_OPENDIR; -/* Ignore return value of fchdir() and close(). We're busted anyway. */ - if (cwd) - fchdir(*cwd); + /* Ignore return value of fchdir() and close(). We're busted anyway. */ + if (cwd) { + int __a_unused ret2 = fchdir(*cwd); /* STFU, gcc */ + } close_cwd: if (cwd) close(*cwd); -- 2.39.2