projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5180446
)
util-lib: mark variable with _unused_ to silence clang warning
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Wed, 1 Nov 2017 22:01:24 +0000
(23:01 +0100)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Wed, 1 Nov 2017 22:10:25 +0000
(23:10 +0100)
_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_.
src/basic/fileio.c
patch
|
blob
|
history
diff --git
a/src/basic/fileio.c
b/src/basic/fileio.c
index
9ee7a4a
..
0ae3305
100644
(file)
--- a/
src/basic/fileio.c
+++ b/
src/basic/fileio.c
@@
-1556,7
+1556,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 (;;) {