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;
FOREACH_DIRENT(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;
{
/* 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 */
}
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;
char temporary_mount[] = "/tmp/namespace-dev-XXXXXX";
const char *d, *dev = NULL, *devpts = NULL, *devshm = NULL, *devhugepages = NULL, *devmqueue = NULL, *devlog = NULL, *devptmx = NULL;
bool can_mknod = true;
- _cleanup_umask_ mode_t u;
+ _unused_ _cleanup_umask_ mode_t u;
int r;
assert(m);
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;
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();
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)
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;
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);
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;
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;
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);
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);
}
}
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);
}
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" \
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);
}
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)
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);
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;
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();
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();
"tty\0"
"net/tun\0";
- _cleanup_umask_ mode_t u;
+ _unused_ _cleanup_umask_ mode_t u;
const char *d;
int r = 0;
}
static int make_extra_nodes(const char *dest) {
- _cleanup_umask_ mode_t u;
+ _unused_ _cleanup_umask_ mode_t u;
size_t i;
int r;
_cleanup_(unlink_and_freep) char *from = NULL;
_cleanup_free_ char *fifo = NULL;
_cleanup_close_ int fd = -1;
- _cleanup_umask_ mode_t u;
+ _unused_ _cleanup_umask_ mode_t u;
int r;
assert(kmsg_socket >= 0);
}
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;
}
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
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;
}
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;
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);
}
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;
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();
* 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);
{ "inaccessible/blk", S_IFBLK | 0000 },
};
- _cleanup_umask_ mode_t u;
+ _unused_ _cleanup_umask_ mode_t u;
int r;
if (!parent_dir)
#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;
}
static int write_entry_utmp(const struct utmpx *store) {
- _cleanup_(utxent_cleanup) bool utmpx = false;
+ _unused_ _cleanup_(utxent_cleanup) bool utmpx = false;
assert(store);
}
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;
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;
struct utmpx *u;
int r;
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;
_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;
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, '=');
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();