tree-wide: mark set-but-not-used variables as unused to make LLVM happy
authorFrantisek Sumsal <frantisek@sumsal.cz>
Wed, 15 Sep 2021 08:56:21 +0000 (10:56 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 10 Mar 2022 12:54:30 +0000 (12:54 +0000)
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.
```

(cherry picked from commit d7ac09520be8f0d3d94df3dd4fd8a6e7404c0174)

31 files changed:
src/basic/process-util.c
src/basic/unit-file.c
src/core/manager.c
src/cryptsetup/cryptsetup.c
src/home/homed.c
src/initctl/initctl.c
src/journal-remote/journal-remote-main.c
src/journal-remote/journal-remote.c
src/journal-remote/journal-upload.c
src/journal/journald-server.c
src/libsystemd-network/sd-dhcp-server.c
src/libsystemd/sd-device/sd-device.c
src/libsystemd/sd-journal/test-catalog.c
src/login/logind-core.c
src/login/logind-session.c
src/login/logind.c
src/network/networkd-dhcp-common.c
src/network/networkd.c
src/network/wait-online/wait-online.c
src/nss-systemd/userdb-glue.c
src/oom/oomd-manager.c
src/oom/oomd.c
src/resolve/resolved-dns-cache.c
src/resolve/resolved-dns-query.c
src/resolve/resolved.c
src/shared/barrier.c
src/shared/utmp-wtmp.c
src/timesync/timesyncd.c
src/tty-ask-password-agent/tty-ask-password-agent.c
src/udev/udevd.c
src/userdb/userdbd.c

index 461bbfe9a5927289200ae1502525fe5d12b49d7c..b76ca6f7c51b125bb0328370bda192e6dc002f00 100644 (file)
@@ -1278,7 +1278,7 @@ int safe_fork_full(
 
         pid_t original_pid, pid;
         sigset_t saved_ss, ss;
-        _cleanup_(restore_sigsetp) sigset_t *saved_ssp = NULL;
+        _unused_ _cleanup_(restore_sigsetp) sigset_t *saved_ssp = NULL;
         bool block_signals = false, block_all = false;
         int prio, r;
 
index 0d58b1c4fe1576f0860b82d1f238d8aadbdd11b5..d1e997ec9f295c052633fc9c300ea6b25e022345 100644 (file)
@@ -286,7 +286,8 @@ int unit_file_build_name_map(
 
                 FOREACH_DIRENT_ALL(de, d, log_warning_errno(errno, "Failed to read \"%s\", ignoring: %m", *dir)) {
                         char *filename;
-                        _cleanup_free_ char *_filename_free = NULL, *simplified = NULL;
+                        _unused_ _cleanup_free_ char *_filename_free = NULL;
+                        _cleanup_free_ char *simplified = NULL;
                         const char *suffix, *dst = NULL;
                         bool valid_unit_name;
 
index 34891a875465aafee15dec642a2bdc7b740b1ea2..abc63a71afc6d3bb4a5f3a5481002a78640c54c7 100644 (file)
@@ -1731,7 +1731,7 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
 
         {
                 /* This block is (optionally) done with the reloading counter bumped */
-                _cleanup_(manager_reloading_stopp) Manager *reloading = NULL;
+                _unused_ _cleanup_(manager_reloading_stopp) Manager *reloading = NULL;
 
                 /* If we will deserialize make sure that during enumeration this is already known, so we increase the
                  * counter here already */
@@ -3770,7 +3770,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
 }
 
 int manager_reload(Manager *m) {
-        _cleanup_(manager_reloading_stopp) Manager *reloading = NULL;
+        _unused_ _cleanup_(manager_reloading_stopp) Manager *reloading = NULL;
         _cleanup_fdset_free_ FDSet *fds = NULL;
         _cleanup_fclose_ FILE *f = NULL;
         int r;
index 0fa41b836028b3bcd8b482951a21021c4d052686..440f17d0178b317c1c33030b12f082260a5690d8 100644 (file)
@@ -1482,7 +1482,7 @@ static int run(int argc, char *argv[]) {
         verb = argv[1];
 
         if (streq(verb, "attach")) {
-                _cleanup_(remove_and_erasep) const char *destroy_key_file = NULL;
+                _unused_ _cleanup_(remove_and_erasep) const char *destroy_key_file = NULL;
                 _cleanup_(erase_and_freep) void *key_data = NULL;
                 const char *volume, *source, *key_file, *options;
                 crypt_status_info status;
index 807d25e2735a235192ddefd000e2ed6b0a1785d1..579c289a686619d000a6eb2e01282223dd225ed3 100644 (file)
@@ -14,7 +14,7 @@
 
 static int run(int argc, char *argv[]) {
         _cleanup_(manager_freep) Manager *m = NULL;
-        _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
         int r;
 
         log_setup();
index c48fef16ef58a4829d7faaabdc68850f184cddea..a48a8570c47ea27b6ae9e598bd5ad0e1268a492a 100644 (file)
@@ -311,7 +311,7 @@ static int process_event(Server *s, struct epoll_event *ev) {
 
 static int run(int argc, char *argv[]) {
         _cleanup_(server_done) Server server = { .epoll_fd = -1 };
-        _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
         int r, n;
 
         if (argc > 1)
index 9ff31763dade3d4e875faae9ea229ea50e71d1d1..b46b4fc08ecd0b53e1888ea2c12b90c31eaf0490 100644 (file)
@@ -1099,7 +1099,7 @@ static int load_certificates(char **key, char **cert, char **trust) {
 
 static int run(int argc, char **argv) {
         _cleanup_(journal_remote_server_destroy) RemoteServer s = {};
-        _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
         _cleanup_(erase_and_freep) char *key = NULL;
         _cleanup_free_ char *cert = NULL, *trust = NULL;
         int r;
index 6e5aebdc485704f110b64058055f0779dfa7f496..f530ba3c7efdfaafa904c00202a87b79c87e7e56 100644 (file)
@@ -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);
index 2a38d206ea16aa3c01ebb4e9a86befa71c1a05c2..37660b925a3b8eca683018d476936a3ef56feefc 100644 (file)
@@ -820,7 +820,7 @@ static int open_journal(sd_journal **j) {
 
 static int run(int argc, char **argv) {
         _cleanup_(destroy_uploader) Uploader u = {};
-        _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
         bool use_journal;
         int r;
 
index 2d1d9e66d79eb05fe925b3a0a03ced94d72a3343..a21207975830472b7dc723f1da2a43c55419c966 100644 (file)
@@ -910,7 +910,7 @@ static void dispatch_message_real(
                 pid_t object_pid) {
 
         char source_time[sizeof("_SOURCE_REALTIME_TIMESTAMP=") + DECIMAL_STR_MAX(usec_t)];
-        _cleanup_free_ char *cmdline1 = NULL, *cmdline2 = NULL;
+        _unused_ _cleanup_free_ char *cmdline1 = NULL, *cmdline2 = NULL;
         uid_t journal_uid;
         ClientContext *o;
 
index 0b3904c02ad4b5c6c7c5ce9f4d4570bb84f48658..070f4ec1c2996baadcf174ef6cc3fbec543564c6 100644 (file)
@@ -1004,7 +1004,8 @@ int dhcp_server_handle_message(sd_dhcp_server *server, DHCPMessage *message, siz
                 /* verify that the requested address is from the pool, and either
                    owned by the current client or free */
                 if (pool_offset >= 0 && static_lease) {
-                        _cleanup_(dhcp_lease_freep) DHCPLease *lease = NULL, *old_lease = NULL;
+                        _unused_ _cleanup_(dhcp_lease_freep) DHCPLease *old_lease = NULL;
+                        _cleanup_(dhcp_lease_freep) DHCPLease *lease = NULL;
                         usec_t time_now, expiration;
 
                         r = sd_event_now(server->event, clock_boottime_or_monotonic(), &time_now);
@@ -1482,7 +1483,8 @@ int sd_dhcp_server_set_static_lease(
                 uint8_t *client_id,
                 size_t client_id_size) {
 
-        _cleanup_(dhcp_lease_freep) DHCPLease *lease = NULL, *old = NULL;
+        _unused_ _cleanup_(dhcp_lease_freep) DHCPLease *old = NULL;
+        _cleanup_(dhcp_lease_freep) DHCPLease *lease = NULL;
         DHCPClientId c;
         int r;
 
index 45261588a87db3c9e497b6a045c17a441d92f15d..3f2cce5bba2fd907358992557cc0657cfba2ec42 100644 (file)
@@ -94,7 +94,8 @@ int device_add_property_aux(sd_device *device, const char *key, const char *valu
                 properties = &device->properties;
 
         if (value) {
-                _cleanup_free_ char *new_key = NULL, *new_value = NULL, *old_key = NULL, *old_value = NULL;
+                _unused_ _cleanup_free_ char *old_value = NULL;
+                _cleanup_free_ char *new_key = NULL, *new_value = NULL, *old_key = NULL;
                 int r;
 
                 r = ordered_hashmap_ensure_allocated(properties, &string_hash_ops_free_free);
@@ -119,7 +120,8 @@ int device_add_property_aux(sd_device *device, const char *key, const char *valu
                 TAKE_PTR(new_key);
                 TAKE_PTR(new_value);
         } else {
-                _cleanup_free_ char *old_key = NULL, *old_value = NULL;
+                _unused_ _cleanup_free_ char *old_value = NULL;
+                _cleanup_free_ char *old_key = NULL;
 
                 old_value = ordered_hashmap_remove2(*properties, key, (void**) &old_key);
         }
@@ -1920,7 +1922,8 @@ _public_ int sd_device_get_trigger_uuid(sd_device *device, sd_id128_t *ret) {
 }
 
 static int device_cache_sysattr_value(sd_device *device, const char *key, char *value) {
-        _cleanup_free_ char *new_key = NULL, *old_value = NULL;
+        _unused_ _cleanup_free_ char *old_value = NULL;
+        _cleanup_free_ char *new_key = NULL;
         int r;
 
         assert(device);
index 982fec0d8db41ecb6bdd61be98c83b127ec443c0..316c3b16344ad29f5f343c0e410b1dbd6a4379d0 100644 (file)
@@ -53,7 +53,7 @@ static void test_catalog_import_invalid(void) {
 }
 
 static void test_catalog_import_badid(void) {
-        _cleanup_ordered_hashmap_free_free_free_ OrderedHashmap *h = NULL;
+        _unused_ _cleanup_ordered_hashmap_free_free_free_ OrderedHashmap *h = NULL;
         const char *input =
 "-- 0027229ca0644181a76c4e92458afaff dededededededededededededededede\n" \
 "Subject: message\n" \
index e08929e52a2f0554b538143069a2c24f77656da9..a9792fd5e45f843bfe7f1ad7f5b18487a56003cc 100644 (file)
@@ -689,7 +689,7 @@ bool manager_all_buttons_ignored(Manager *m) {
 int manager_read_utmp(Manager *m) {
 #if ENABLE_UTMP
         int r;
-        _cleanup_(utxent_cleanup) bool utmpx = false;
+        _unused_ _cleanup_(utxent_cleanup) bool utmpx = false;
 
         assert(m);
 
index 3f09750ec9b4b1cbd6fe83467387c1021750f997..cde2b5e8bb39294baee5fc9d32edc98cf599f8d9 100644 (file)
@@ -1323,7 +1323,7 @@ bool session_is_controller(Session *s, const char *sender) {
 }
 
 static void session_release_controller(Session *s, bool notify) {
-        _cleanup_free_ char *name = NULL;
+        _unused_ _cleanup_free_ char *name = NULL;
         SessionDevice *sd;
 
         if (!s->controller)
index ec52a57acb59e112247ef8b9065eaf4fd8cdd31c..b642da6eaa68302817e78a94a2668f23937430e9 100644 (file)
@@ -1155,7 +1155,7 @@ static int manager_run(Manager *m) {
 
 static int run(int argc, char *argv[]) {
         _cleanup_(manager_unrefp) Manager *m = NULL;
-        _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
         int r;
 
         log_set_facility(LOG_AUTH);
index 249d780887eeca0b972bfa1ab29049dc10e26f43..02cef0fbfcb5176ad95f90e22ee5a969da70232b 100644 (file)
@@ -631,8 +631,10 @@ int config_parse_dhcp_send_option(
                 void *data,
                 void *userdata) {
 
-        _cleanup_(sd_dhcp_option_unrefp) sd_dhcp_option *opt4 = NULL, *old4 = NULL;
-        _cleanup_(sd_dhcp6_option_unrefp) sd_dhcp6_option *opt6 = NULL, *old6 = NULL;
+        _cleanup_(sd_dhcp_option_unrefp) sd_dhcp_option *opt4 = NULL;
+        _cleanup_(sd_dhcp6_option_unrefp) sd_dhcp6_option *opt6 = NULL;
+        _unused_ _cleanup_(sd_dhcp_option_unrefp) sd_dhcp_option *old4 = NULL;
+        _unused_ _cleanup_(sd_dhcp6_option_unrefp) sd_dhcp6_option *old6 = NULL;
         uint32_t uint32_data, enterprise_identifier = 0;
         _cleanup_free_ char *word = NULL, *q = NULL;
         OrderedHashmap **options = data;
index 48f6061b1f2c109de0af7656bbcc5b17b076f648..ff3380c82cfc18ff7a3437d90fe2587bb0280f70 100644 (file)
@@ -19,7 +19,7 @@
 
 static int run(int argc, char *argv[]) {
         _cleanup_(manager_freep) Manager *m = NULL;
-        _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
         int r;
 
         log_setup();
index 1b24b6f1a695dad0e78cf48ea4b1c9e3a9d534e8..3ce29ac67994eb88c1fa7481fcc1a36281666e43 100644 (file)
@@ -195,7 +195,7 @@ static int parse_argv(int argc, char *argv[]) {
 
 static int run(int argc, char *argv[]) {
         _cleanup_(manager_freep) Manager *m = NULL;
-        _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
         int r;
 
         log_setup();
index c865ff0d82e11f3da0cfb945898086152a757248..002e6925f957a4accb07403a4e5caf406d30c127 100644 (file)
@@ -303,7 +303,7 @@ enum nss_status userdb_getgrnam(
         }
 
         if (!g) {
-                _cleanup_(_nss_systemd_unblockp) bool blocked = false;
+                _unused_ _cleanup_(_nss_systemd_unblockp) bool blocked = false;
 
                 if (strv_isempty(members))
                         return NSS_STATUS_NOTFOUND;
@@ -365,7 +365,7 @@ enum nss_status userdb_getgrgid(
         }
 
         if (!g) {
-                _cleanup_(_nss_systemd_unblockp) bool blocked = false;
+                _unused_ _cleanup_(_nss_systemd_unblockp) bool blocked = false;
 
                 /* So, quite possibly we have to extend an existing group record with additional members. But
                  * to do this we need to know the group name first. The group didn't exist via non-NSS
index 727206d0b382915f2ee45f0e7480ccdddc5975fe..891b0acacbbeaa60e4f80012513a41db24591e31 100644 (file)
@@ -387,7 +387,7 @@ static void clear_candidate_hashmapp(Manager **m) {
 static int monitor_memory_pressure_contexts_handler(sd_event_source *s, uint64_t usec, void *userdata) {
         /* Don't want to use stale candidate data. Setting this will clear the candidate hashmap on return unless we
          * update the candidate data (in which case clear_candidates will be NULL). */
-        _cleanup_(clear_candidate_hashmapp) Manager *clear_candidates = userdata;
+        _unused_ _cleanup_(clear_candidate_hashmapp) Manager *clear_candidates = userdata;
         _cleanup_set_free_ Set *targets = NULL;
         bool in_post_action_delay = false;
         Manager *m = userdata;
index deb7b094d504b49858f78f57a1ff9bf5361ac859..e13a1b35e55476af25c4b3e2d97fa01e7d69e6a0 100644 (file)
@@ -116,7 +116,7 @@ static int parse_argv(int argc, char *argv[]) {
 }
 
 static int run(int argc, char *argv[]) {
-        _cleanup_(notify_on_cleanup) const char *notify_msg = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_msg = NULL;
         _cleanup_(manager_freep) Manager *m = NULL;
         _cleanup_free_ char *swap = NULL;
         unsigned long long s = 0;
index f73ead872dd616efe7c3b799d1118da7dd2bd5e4..c2fca1fabea5bf09311e604cd230e61c39935ebf 100644 (file)
@@ -274,7 +274,7 @@ static int dns_cache_link_item(DnsCache *c, DnsCacheItem *i) {
 
         first = hashmap_get(c->by_key, i->key);
         if (first) {
-                _cleanup_(dns_resource_key_unrefp) DnsResourceKey *k = NULL;
+                _unused_ _cleanup_(dns_resource_key_unrefp) DnsResourceKey *k = NULL;
 
                 /* Keep a reference to the original key, while we manipulate the list. */
                 k = dns_resource_key_ref(first->key);
index 6d372395fe705c31b748795996d3427057d02a92..192bfd3bf5682bf90719a6a144a98efd83079c0a 100644 (file)
@@ -165,7 +165,7 @@ static int dns_query_candidate_add_transaction(
 }
 
 static int dns_query_candidate_go(DnsQueryCandidate *c) {
-        _cleanup_(dns_query_candidate_unrefp) DnsQueryCandidate *keep_c = NULL;
+        _unused_ _cleanup_(dns_query_candidate_unrefp) DnsQueryCandidate *keep_c = NULL;
         DnsTransaction *t;
         int r;
         unsigned n = 0;
index aabaa266e99cef9a3e8f2d2a9d6473f55ddda762..85ab917c4fa9d922f570342c8336ec0b479e8200 100644 (file)
@@ -23,7 +23,7 @@
 
 static int run(int argc, char *argv[]) {
         _cleanup_(manager_freep) Manager *m = NULL;
-        _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
         int r;
 
         log_setup();
index 2864c1b8f9026051c9e8f9d952874ce98cdd939f..87061f55d7ed9ffd45ca7f0e6bf52aa8da76649e 100644 (file)
@@ -90,7 +90,7 @@
  * Returns: 0 on success, negative error code on failure.
  */
 int barrier_create(Barrier *b) {
-        _cleanup_(barrier_destroyp) Barrier *staging = b;
+        _unused_ _cleanup_(barrier_destroyp) Barrier *staging = b;
         int r;
 
         assert(b);
index 784aad2943fc7a9e9126c2168865342192a0a493..d529498fade0ef3a93f8ad09ae8da98bea8f6a1b 100644 (file)
@@ -25,7 +25,7 @@
 #include "utmp-wtmp.h"
 
 int utmp_get_runlevel(int *runlevel, int *previous) {
-        _cleanup_(utxent_cleanup) bool utmpx = false;
+        _unused_ _cleanup_(utxent_cleanup) bool utmpx = false;
         struct utmpx *found, lookup = { .ut_type = RUN_LVL };
         const char *e;
 
@@ -87,7 +87,7 @@ static void init_entry(struct utmpx *store, usec_t t) {
 }
 
 static int write_entry_utmp(const struct utmpx *store) {
-        _cleanup_(utxent_cleanup) bool utmpx = false;
+        _unused_ _cleanup_(utxent_cleanup) bool utmpx = false;
 
         assert(store);
 
@@ -215,7 +215,7 @@ int utmp_put_init_process(const char *id, pid_t pid, pid_t sid, const char *line
 }
 
 int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
-        _cleanup_(utxent_cleanup) bool utmpx = false;
+        _unused_ _cleanup_(utxent_cleanup) bool utmpx = false;
         struct utmpx lookup = {
                 .ut_type = INIT_PROCESS /* looks for DEAD_PROCESS, LOGIN_PROCESS, USER_PROCESS, too */
         }, store, store_wtmp, *found;
@@ -340,7 +340,7 @@ int utmp_wall(
         bool (*match_tty)(const char *tty, void *userdata),
         void *userdata) {
 
-        _cleanup_(utxent_cleanup) bool utmpx = false;
+        _unused_ _cleanup_(utxent_cleanup) bool utmpx = false;
         _cleanup_free_ char *text = NULL, *hn = NULL, *un = NULL, *stdin_tty = NULL;
         char date[FORMAT_TIMESTAMP_MAX];
         struct utmpx *u;
index e6a2b06687346460d526c77be00a324f8613a246..8d43e55583f2e80edf7bec1775f069ad15ecc20e 100644 (file)
@@ -90,7 +90,7 @@ settime:
 
 static int run(int argc, char *argv[]) {
         _cleanup_(manager_freep) Manager *m = NULL;
-        _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_message = NULL;
         const char *user = "systemd-timesync";
         uid_t uid, uid_current;
         gid_t gid;
index 59b144972b82c0a0d757536901c31d7eee7c55ee..25d69180c5abaa7e89d338a95584d8cf1b776da0 100644 (file)
@@ -338,7 +338,8 @@ static int process_and_watch_password_files(bool watch) {
                 _FD_MAX
         };
 
-        _cleanup_close_ int notify = -1, signal_fd = -1, tty_block_fd = -1;
+        _unused_ _cleanup_close_ int tty_block_fd = -1;
+        _cleanup_close_ int notify = -1, signal_fd = -1;
         struct pollfd pollfd[_FD_MAX];
         sigset_t mask;
         int r;
index 13ac7c83b525d83f3d13f4dcad8e2fe066e16610..8808c5cf95d02af99102bdfa2c972e07e95d8e67 100644 (file)
@@ -1092,7 +1092,8 @@ static int on_ctrl_msg(struct udev_ctrl *uctrl, enum udev_ctrl_msg_type type, co
                 manager_reload(manager);
                 break;
         case UDEV_CTRL_SET_ENV: {
-                _cleanup_free_ char *key = NULL, *val = NULL, *old_key = NULL, *old_val = NULL;
+                _unused_ _cleanup_free_ char *old_val = NULL;
+                _cleanup_free_ char *key = NULL, *val = NULL, *old_key = NULL;
                 const char *eq;
 
                 eq = strchr(value->buf, '=');
index d469411eb82e1f12596ee8c42639980a2b4c4a2c..0c321bf41197dffe087301d471cdad3dbcc4537e 100644 (file)
@@ -24,7 +24,7 @@
 
 static int run(int argc, char *argv[]) {
         _cleanup_(manager_freep) Manager *m = NULL;
-        _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
+        _unused_ _cleanup_(notify_on_cleanup) const char *notify_stop = NULL;
         int r;
 
         log_setup();