aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2023-02-26 11:30:21 +0100
committerMatthias Andree <matthias.andree@gmx.de>2023-02-26 11:30:21 +0100
commit32b2216136fdfab2c0b2c5d263936eeffa75e57d (patch)
tree61f0a23e16fabf7fca557daad5779162e5517470
parent525fff3659c7b6b723ffa0347832e9132936a76e (diff)
downloadfetchmail-32b2216136fdfab2c0b2c5d263936eeffa75e57d.tar.gz
fetchmail-32b2216136fdfab2c0b2c5d263936eeffa75e57d.tar.bz2
fetchmail-32b2216136fdfab2c0b2c5d263936eeffa75e57d.zip
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...
-rw-r--r--lock.c3
1 files changed, 2 insertions, 1 deletions
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;
}
}
}