From: Zbigniew Jędrzejewski-Szmek Date: Wed, 1 Nov 2017 22:01:24 +0000 (+0100) Subject: util-lib: mark variable with _unused_ to silence clang warning X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=22662de7edd00b87e5e8d8b4d76cda5a56344117;p=elogind.git util-lib: mark variable with _unused_ to silence clang warning _unused_ means "the variable is meant to be possible unused and gcc will not generate a warning about it", which is exactly what we need here, since we're only declaring it for the side effect of _cleanup_. --- diff --git a/src/basic/fileio.c b/src/basic/fileio.c index 46b8b4a69..6800b9297 100644 --- a/src/basic/fileio.c +++ b/src/basic/fileio.c @@ -1568,7 +1568,7 @@ int read_line(FILE *f, size_t limit, char **ret) { } { - _cleanup_(funlockfilep) FILE *flocked = f; + _unused_ _cleanup_(funlockfilep) FILE *flocked = f; flockfile(f); for (;;) {