summaryrefslogtreecommitdiff
path: root/src/journal-remote/journal-remote.c
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2021-09-15 10:56:21 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2021-09-15 13:09:45 +0200
commitd7ac09520be8f0d3d94df3dd4fd8a6e7404c0174 (patch)
tree834a60f9b7b22957ff572bcd979737992a0e7ae7 /src/journal-remote/journal-remote.c
parentbd8ea741a424cc730ce88cf62af0046cc33d5249 (diff)
downloadsystemd-d7ac09520be8f0d3d94df3dd4fd8a6e7404c0174.tar.gz
tree-wide: mark set-but-not-used variables as unused to make LLVM happy
LLVM 13 introduced `-Wunused-but-set-variable` diagnostic flag, which trips over some intentionally set-but-not-used variables or variables attached to cleanup handlers with side effects (`_cleanup_umask_`, `_cleanup_(notify_on_cleanup)`, `_cleanup_(restore_sigsetp)`, etc.): ``` ../src/basic/process-util.c:1257:46: error: variable 'saved_ssp' set but not used [-Werror,-Wunused-but-set-variable] _cleanup_(restore_sigsetp) sigset_t *saved_ssp = NULL; ^ 1 error generated. ```
Diffstat (limited to 'src/journal-remote/journal-remote.c')
-rw-r--r--src/journal-remote/journal-remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c
index 9c1ee0188d..13a9f74e6f 100644
--- a/src/journal-remote/journal-remote.c
+++ b/src/journal-remote/journal-remote.c
@@ -272,7 +272,7 @@ int journal_remote_add_source(RemoteServer *s, int fd, char* name, bool own_name
int journal_remote_add_raw_socket(RemoteServer *s, int fd) {
int r;
- _cleanup_close_ int fd_ = fd;
+ _unused_ _cleanup_close_ int fd_ = fd;
char name[STRLEN("raw-socket-") + DECIMAL_STR_MAX(int) + 1];
assert(fd >= 0);