From: Andre Noll Date: Tue, 6 Jan 2015 17:32:58 +0000 (+0100) Subject: Silence a gcc warning. X-Git-Tag: v0.1.3~14 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=952a0fe4afb455c8d719eb920b9e3983405af3ec;p=osl.git 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. --- 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);