From 32b2216136fdfab2c0b2c5d263936eeffa75e57d Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 26 Feb 2023 11:30:21 +0100 Subject: lock.c: work around stupid GCC 7, GCC 9 warnings that warn about an unused return value although it is explicitly cast to void. Use a dummy variable and cast that to void instead... --- lock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lock.c') diff --git a/lock.c b/lock.c index 57676f89..65dc8013 100644 --- a/lock.c +++ b/lock.c @@ -61,7 +61,8 @@ static void unlockit(void) { if (lockfile && lock_acquired) { if (unlink(lockfile)) { - (void)truncate(lockfile, (off_t)0); + int dummy = truncate(lockfile, (off_t)0); + (void)dummy; } } } -- cgit v1.2.3