diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-10-07 05:47:57 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-10-07 09:51:37 +0200 |
commit | f769518c9ac6ca6bef063092ddc0e1718a67f540 (patch) | |
tree | 2bf69333b29b19c03b9b6e02df1a66c055e116a2 | |
parent | network: use Network.name for bus path (diff) | |
download | systemd-f769518c9ac6ca6bef063092ddc0e1718a67f540.tar.xz systemd-f769518c9ac6ca6bef063092ddc0e1718a67f540.zip |
tree-wide: drop doubled empty lines
62 files changed, 0 insertions, 69 deletions
diff --git a/hwdb.d/60-keyboard.hwdb b/hwdb.d/60-keyboard.hwdb index 798529cd10..4d5f6b4beb 100644 --- a/hwdb.d/60-keyboard.hwdb +++ b/hwdb.d/60-keyboard.hwdb @@ -1435,7 +1435,6 @@ evdev:input:b0003v046DpC309* KEYBOARD_KEY_c01b6=images # My Pictures (F11) KEYBOARD_KEY_c01b7=audio # My Music (F12) - ########################################################### # Maxdata ########################################################### @@ -1920,7 +1919,6 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svn[sS][aA][mM][sS][uU][nN][gG]*:sku*SCAI*:* KEYBOARD_KEY_a9=!unknown # Fn+F12 Fn lock Off - handled by hardware KEYBOARD_KEY_8f=!battery # Notification that battery has met charge control end threshold - ########################################################### # SONY ########################################################### diff --git a/src/analyze/analyze-plot.c b/src/analyze/analyze-plot.c index d14c40de60..5e33f62404 100644 --- a/src/analyze/analyze-plot.c +++ b/src/analyze/analyze-plot.c @@ -33,7 +33,6 @@ #define svg_timestamp(b, t, y) \ svg_text(b, t, y, "%u.%03us", (unsigned)((t) / USEC_PER_SEC), (unsigned)(((t) % USEC_PER_SEC) / USEC_PER_MSEC)) - typedef struct HostInfo { char *hostname; char *kernel_name; diff --git a/src/basic/ansi-color.h b/src/basic/ansi-color.h index efc1dea131..5f1418109c 100644 --- a/src/basic/ansi-color.h +++ b/src/basic/ansi-color.h @@ -102,7 +102,6 @@ static inline const char* ansi_add_underline_grey(void) { colors_enabled() ? ANSI_##NAME : ""; \ } - #define DEFINE_ANSI_FUNC_UNDERLINE_256(name, NAME, FALLBACK) \ static inline const char* ansi_##name(void) { \ switch (get_color_mode()) { \ diff --git a/src/basic/capability-util.c b/src/basic/capability-util.c index e9b41fe791..47bb381a6c 100644 --- a/src/basic/capability-util.c +++ b/src/basic/capability-util.c @@ -637,7 +637,6 @@ int capability_get_ambient(uint64_t *ret) { a |= UINT64_C(1) << i; } - *ret = a; return 1; } diff --git a/src/basic/confidential-virt.c b/src/basic/confidential-virt.c index c246636c7c..986a57e046 100644 --- a/src/basic/confidential-virt.c +++ b/src/basic/confidential-virt.c @@ -16,7 +16,6 @@ #include "string-table.h" #include "utf8.h" - #if defined(__x86_64__) static void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) { diff --git a/src/basic/filesystems.c b/src/basic/filesystems.c index aff1791c1d..05ff75cd5d 100644 --- a/src/basic/filesystems.c +++ b/src/basic/filesystems.c @@ -12,7 +12,6 @@ const char* fs_type_to_string(statfs_f_type_t magic) { return NULL; } - int fs_type_from_string(const char *name, const statfs_f_type_t **ret) { const struct FilesystemMagic *fs_magic; diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c index 776733148b..378fd92b06 100644 --- a/src/basic/recurse-dir.c +++ b/src/basic/recurse-dir.c @@ -471,7 +471,6 @@ int recurse_dir( statx_mask != 0 ? &sx : NULL, /* only pass sx if user asked for it */ userdata); - if (r == RECURSE_DIR_LEAVE_DIRECTORY) break; if (!IN_SET(r, RECURSE_DIR_SKIP_ENTRY, RECURSE_DIR_CONTINUE)) diff --git a/src/basic/xattr-util.h b/src/basic/xattr-util.h index 19ee3e1c45..17c3684280 100644 --- a/src/basic/xattr-util.h +++ b/src/basic/xattr-util.h @@ -27,7 +27,6 @@ static inline int fd_getcrtime(int fd, usec_t *ret) { return fd_getcrtime_at(fd, NULL, 0, ret); } - int listxattr_at_malloc(int fd, const char *path, int flags, char **ret); static inline int listxattr_malloc(const char *path, char **ret) { return listxattr_at_malloc(AT_FDCWD, path, AT_SYMLINK_FOLLOW, ret); diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index cf499383f5..107b55d8ec 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -176,7 +176,6 @@ int config_parse_cpu_shares( assert(lvalue); assert(rvalue); - log_syntax(unit, LOG_WARNING, filename, line, 0, "Unit uses %s=; please use CPUWeight= instead. Support for %s= will be removed soon.", lvalue, lvalue); diff --git a/src/core/socket.c b/src/core/socket.c index 0701780f03..8519aefa68 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -664,7 +664,6 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) { "%sFlushPending: %s\n", prefix, yes_no(s->flush_pending)); - if (s->priority >= 0) fprintf(f, "%sPriority: %i\n", diff --git a/src/cryptenroll/cryptenroll.c b/src/cryptenroll/cryptenroll.c index ad98acb762..a205f59dcc 100644 --- a/src/cryptenroll/cryptenroll.c +++ b/src/cryptenroll/cryptenroll.c @@ -504,7 +504,6 @@ static int parse_argv(int argc, char *argv[]) { return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Multiple operations specified at once, refusing."); - r = parse_path_argument(optarg, /* suppress_root= */ false, &arg_tpm2_device_key); if (r < 0) return r; diff --git a/src/home/homectl.c b/src/home/homectl.c index 87961a2f22..ced4b198de 100644 --- a/src/home/homectl.c +++ b/src/home/homectl.c @@ -183,7 +183,6 @@ static int list_homes(int argc, char *argv[], void *userdata) { if (r < 0) return table_log_add_error(r); - r = table_add_cell(table, &cell, TABLE_STRING, state); if (r < 0) return table_log_add_error(r); diff --git a/src/home/homed-manager-bus.c b/src/home/homed-manager-bus.c index 58cd037105..69c7680b9e 100644 --- a/src/home/homed-manager-bus.c +++ b/src/home/homed-manager-bus.c @@ -485,7 +485,6 @@ static int method_unregister_home(sd_bus_message *message, void *userdata, sd_bu return generic_home_method(userdata, message, bus_home_method_unregister, error); } - static int method_create_home(sd_bus_message *message, void *userdata, sd_bus_error *error) { _cleanup_(user_record_unrefp) UserRecord *hr = NULL; _cleanup_hashmap_free_ Hashmap *blobs = NULL; diff --git a/src/home/homed-manager.c b/src/home/homed-manager.c index 8a4544b269..6f5b6feda2 100644 --- a/src/home/homed-manager.c +++ b/src/home/homed-manager.c @@ -1998,7 +1998,6 @@ static int manager_rebalance_calculate(Manager *m) { 1 * USEC_PER_MINUTE, 15 * USEC_PER_MINUTE); - log_debug("Rebalancing interval set to %s.", FORMAT_TIMESPAN(m->rebalance_interval_usec, USEC_PER_MSEC)); /* Let's suppress small resizes, growing/shrinking file systems isn't free after all */ diff --git a/src/home/homework-fscrypt.c b/src/home/homework-fscrypt.c index 92ce5c39ba..3a9d4ea891 100644 --- a/src/home/homework-fscrypt.c +++ b/src/home/homework-fscrypt.c @@ -187,7 +187,6 @@ static int fscrypt_slot_try_one( const uint8_t match_key_descriptor[static FS_KEY_DESCRIPTOR_SIZE], void **ret_decrypted, size_t *ret_decrypted_size) { - _cleanup_(EVP_CIPHER_CTX_freep) EVP_CIPHER_CTX *context = NULL; _cleanup_(erase_and_freep) void *decrypted = NULL; uint8_t key_descriptor[FS_KEY_DESCRIPTOR_SIZE]; diff --git a/src/home/homework-luks.c b/src/home/homework-luks.c index 7c3be8dd9a..4b73bd779d 100644 --- a/src/home/homework-luks.c +++ b/src/home/homework-luks.c @@ -728,7 +728,6 @@ static int luks_validate( if (!streq_ptr(blkid_partition_get_name(pp), label)) continue; - r = blkid_partition_get_uuid_id128(pp, &id); if (r < 0) log_debug_errno(r, "Failed to read partition UUID, ignoring: %m"); diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c index 1f98c975fe..ac787b59b5 100644 --- a/src/hostname/hostnamectl.c +++ b/src/hostname/hostnamectl.c @@ -519,7 +519,6 @@ static int show_status(int argc, char **argv, void *userdata) { return show_all_names(bus); } - static int set_simple_string_internal(sd_bus *bus, sd_bus_error *error, const char *target, const char *method, const char *value) { _cleanup_(sd_bus_error_free) sd_bus_error e = SD_BUS_ERROR_NULL; int r; diff --git a/src/import/importctl.c b/src/import/importctl.c index 85903bb8c6..6bf63916f8 100644 --- a/src/import/importctl.c +++ b/src/import/importctl.c @@ -475,7 +475,6 @@ static int import_fs(int argc, char *argv[], void *userdata) { if (r < 0) return bus_log_create_error(r); - return transfer_image_common(bus, m); } diff --git a/src/integritysetup/integrity-util.c b/src/integritysetup/integrity-util.c index bc0fc645d0..69f55c256d 100644 --- a/src/integritysetup/integrity-util.c +++ b/src/integritysetup/integrity-util.c @@ -6,7 +6,6 @@ #include "path-util.h" #include "percent-util.h" - static int supported_integrity_algorithm(char *user_supplied) { if (!STR_IN_SET(user_supplied, "crc32", "crc32c", "xxhash64", "sha1", "sha256", "hmac-sha256")) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Unsupported integrity algorithm (%s)", user_supplied); diff --git a/src/integritysetup/integrity-util.h b/src/integritysetup/integrity-util.h index b27975c7db..359d2556a4 100644 --- a/src/integritysetup/integrity-util.h +++ b/src/integritysetup/integrity-util.h @@ -6,7 +6,6 @@ #include "cryptsetup-util.h" #include "time-util.h" - int parse_integrity_options( const char *options, uint32_t *ret_activate_flags, diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c index e8437e3af4..b019eda0d2 100644 --- a/src/journal/journald-stream.c +++ b/src/journal/journald-stream.c @@ -508,7 +508,6 @@ static int stdout_stream_scan( assert(s); assert(p); - for (;;) { LineBreak line_break; size_t skip, found; diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 41638ac715..cf26bd0e48 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -984,7 +984,6 @@ static int client_append_common_discover_request_options(sd_dhcp_client *client, return r; } - return 0; } diff --git a/src/libsystemd-network/test-acd.c b/src/libsystemd-network/test-acd.c index 6ed7260a72..4544cf8a57 100644 --- a/src/libsystemd-network/test-acd.c +++ b/src/libsystemd-network/test-acd.c @@ -7,7 +7,6 @@ #include <stdlib.h> #include <unistd.h> - #include "sd-event.h" #include "sd-ipv4acd.h" #include "sd-netlink.h" diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 296f450826..a3a8727788 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -4158,7 +4158,6 @@ static int message_parse_fields(sd_bus_message *m) { if (m->reply_cookie != 0) return -EBADMSG; - if (!streq(signature, "u")) return -EBADMSG; diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 77d2c116db..ae1ab2dff9 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -1689,7 +1689,6 @@ _public_ int sd_event_add_child_pidfd( sd_event_child_handler_t callback, void *userdata) { - _cleanup_(source_freep) sd_event_source *s = NULL; pid_t pid; int r; @@ -4925,7 +4924,6 @@ _public_ int sd_event_loop(sd_event *e) { assert_return(!event_origin_changed(e), -ECHILD); assert_return(e->state == SD_EVENT_INITIAL, -EBUSY); - PROTECT_EVENT(e); while (e->state != SD_EVENT_FINISHED) { diff --git a/src/libsystemd/sd-journal/journal-def.h b/src/libsystemd/sd-journal/journal-def.h index 07851229f8..02576077b0 100644 --- a/src/libsystemd/sd-journal/journal-def.h +++ b/src/libsystemd/sd-journal/journal-def.h @@ -188,7 +188,6 @@ enum { HEADER_INCOMPATIBLE_COMPACT, }; - enum { HEADER_COMPATIBLE_SEALED = 1 << 0, HEADER_COMPATIBLE_TAIL_ENTRY_BOOT_ID = 1 << 1, /* if set, the last_entry_boot_id field in the header is exclusively refreshed when an entry is appended */ @@ -201,7 +200,6 @@ enum { HEADER_COMPATIBLE_TAIL_ENTRY_BOOT_ID, }; - #define HEADER_SIGNATURE \ ((const uint8_t[]) { 'L', 'P', 'K', 'S', 'H', 'H', 'R', 'H' }) diff --git a/src/login/loginctl.c b/src/login/loginctl.c index c538b61e0d..c323817b4b 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -621,7 +621,6 @@ static int print_session_status_info(sd_bus *bus, const char *path) { return table_log_add_error(r); } - if (!isempty(i.seat)) { r = table_add_cell(table, NULL, TABLE_FIELD, "Seat"); if (r < 0) diff --git a/src/machine/machined-core.c b/src/machine/machined-core.c index 0045f75b0c..d921dfb27e 100644 --- a/src/machine/machined-core.c +++ b/src/machine/machined-core.c @@ -399,7 +399,6 @@ int machine_get_os_release(Machine *machine, char ***ret_os_release) { return -EOPNOTSUPP; } - *ret_os_release = TAKE_PTR(l); return 0; } diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c index e2f879e722..0065a5452e 100644 --- a/src/network/netdev/ipoib.c +++ b/src/network/netdev/ipoib.c @@ -138,7 +138,6 @@ int config_parse_ipoib_pkey( return 0; } - const NetDevVTable ipoib_vtable = { .object_size = sizeof(IPoIB), .sections = NETDEV_COMMON_SECTIONS "IPoIB\0", diff --git a/src/network/networkd-address-generation.c b/src/network/networkd-address-generation.c index 816cdf713a..2663af87f6 100644 --- a/src/network/networkd-address-generation.c +++ b/src/network/networkd-address-generation.c @@ -153,7 +153,6 @@ static int ipv6_token_type_put_by_addr(Hashmap **tokens_by_addr, const struct in return ipv6_token_put_by_addr(tokens_by_addr, addr, token); } - static int generate_eui64_address(const Link *link, const struct in6_addr *prefix, struct in6_addr *ret) { assert(link); assert(prefix); diff --git a/src/network/networkd-neighbor.c b/src/network/networkd-neighbor.c index 87af5e9e62..6bfb6579e1 100644 --- a/src/network/networkd-neighbor.c +++ b/src/network/networkd-neighbor.c @@ -727,7 +727,6 @@ int network_drop_invalid_neighbors(Network *network) { return 0; } - int config_parse_neighbor_section( const char *unit, const char *filename, diff --git a/src/network/networkd-queue.h b/src/network/networkd-queue.h index 3289183f2d..b50851ecdd 100644 --- a/src/network/networkd-queue.h +++ b/src/network/networkd-queue.h @@ -189,7 +189,6 @@ int remove_request_add( _r; \ }) - #define link_remove_request_add(link, data, name, nl, m, handler) \ ({ \ Link *_link = (link); \ diff --git a/src/network/networkd-radv.c b/src/network/networkd-radv.c index 652e7845fc..347788eca7 100644 --- a/src/network/networkd-radv.c +++ b/src/network/networkd-radv.c @@ -881,7 +881,6 @@ void network_adjust_radv(Network *network) { if (prefix_section_verify(prefix) < 0) prefix_free(prefix); - RoutePrefix *route; HASHMAP_FOREACH(route, network->route_prefixes_by_section) if (route_prefix_section_verify(route) < 0) diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 47eff33e46..70ce4e6d79 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -6168,7 +6168,6 @@ static int run(int argc, char *argv[]) { assert(arg_image); assert(!arg_template); - r = chase_and_update(&arg_image, 0); if (r < 0) goto finish; diff --git a/src/nss-systemd/userdb-glue.c b/src/nss-systemd/userdb-glue.c index b02d89a20b..61311d8db3 100644 --- a/src/nss-systemd/userdb-glue.c +++ b/src/nss-systemd/userdb-glue.c @@ -346,7 +346,6 @@ enum nss_status userdb_getgrgid( size_t buflen, int *errnop) { - _cleanup_(group_record_unrefp) GroupRecord *g = NULL; _cleanup_strv_free_ char **members = NULL; bool from_nss; diff --git a/src/partition/repart.c b/src/partition/repart.c index c87cceb4da..8b51dc8ec5 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -3877,7 +3877,6 @@ static int context_dump(Context *context, bool late) { return 0; } - static bool context_changed(const Context *context) { assert(context); diff --git a/src/pcrlock/pcrlock.c b/src/pcrlock/pcrlock.c index 502f05ac66..46f285d54a 100644 --- a/src/pcrlock/pcrlock.c +++ b/src/pcrlock/pcrlock.c @@ -850,7 +850,6 @@ catchall: return log_oom(); return 1; - invalid: /* Mark the payload as invalid, so that we do not bother parsing/validating it any further */ rec->event_payload_valid = EVENT_PAYLOAD_VALID_NO; diff --git a/src/resolve/resolved-dns-answer.c b/src/resolve/resolved-dns-answer.c index 254f8362d3..d4c3922971 100644 --- a/src/resolve/resolved-dns-answer.c +++ b/src/resolve/resolved-dns-answer.c @@ -663,7 +663,6 @@ void dns_answer_order_by_scope(DnsAnswer *a, bool prefer_link_local) { if (dns_resource_record_is_link_local_address(item->rr) != prefer_link_local) *p++ = dns_answer_item_ref(item); - assert((size_t) (p - items) == n); ordered_set_clear(a->items); diff --git a/src/resolve/resolved-dns-question.c b/src/resolve/resolved-dns-question.c index 18e2fe2485..6832a4766c 100644 --- a/src/resolve/resolved-dns-question.c +++ b/src/resolve/resolved-dns-question.c @@ -73,7 +73,6 @@ int dns_question_add(DnsQuestion *q, DnsResourceKey *key, DnsQuestionFlags flags if (!q) return -ENOSPC; - DNS_QUESTION_FOREACH_ITEM(item, q) { r = dns_resource_key_equal(item->key, key); if (r < 0) @@ -185,7 +184,6 @@ int dns_question_contains_key(DnsQuestion *q, const DnsResourceKey *k) { if (!q) return 0; - for (j = 0; j < q->n_keys; j++) { r = dns_resource_key_equal(q->items[j].key, k); if (r != 0) diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c index cc7a5b64b6..bbd0aef1c8 100644 --- a/src/resolve/resolved-dns-rr.c +++ b/src/resolve/resolved-dns-rr.c @@ -2370,7 +2370,6 @@ int dns_resource_record_to_json(DnsResourceRecord *rr, sd_json_variant **ret) { SD_JSON_BUILD_PAIR("algorithm", SD_JSON_BUILD_UNSIGNED(rr->dnskey.algorithm)), SD_JSON_BUILD_PAIR("dnskey", SD_JSON_BUILD_BASE64(rr->dnskey.key, rr->dnskey.key_size))); - case DNS_TYPE_RRSIG: return sd_json_buildo( ret, diff --git a/src/resolve/resolved-mdns.c b/src/resolve/resolved-mdns.c index 0fb83a3c22..7e9bb693af 100644 --- a/src/resolve/resolved-mdns.c +++ b/src/resolve/resolved-mdns.c @@ -236,7 +236,6 @@ static bool sender_on_local_subnet(DnsScope *s, DnsPacket *p) { return false; } - static int mdns_scope_process_query(DnsScope *s, DnsPacket *p) { _cleanup_(dns_answer_unrefp) DnsAnswer *full_answer = NULL; _cleanup_(dns_packet_unrefp) DnsPacket *reply = NULL; diff --git a/src/resolve/test-dnssec.c b/src/resolve/test-dnssec.c index d325b533ea..6b0ab66ae7 100644 --- a/src/resolve/test-dnssec.c +++ b/src/resolve/test-dnssec.c @@ -387,7 +387,6 @@ TEST(dnssec_verify_rfc6605_example2) { 0xab, 0xf0, 0x8f, 0xe6, 0x95, 0x53, 0x60, 0x17, 0xa5, 0xbf, 0xa9, 0x32, 0x37, 0xee, 0x6e, 0x34, }; - _cleanup_(dns_resource_record_unrefp) DnsResourceRecord *dnskey = NULL, *ds = NULL, *a = NULL, *rrsig = NULL; _cleanup_(dns_answer_unrefp) DnsAnswer *answer = NULL; diff --git a/src/shared/bpf-compat.h b/src/shared/bpf-compat.h index 5a7945cb9b..3d94bf2e05 100644 --- a/src/shared/bpf-compat.h +++ b/src/shared/bpf-compat.h @@ -15,7 +15,6 @@ * compile time is that we can then load either the old or the new symbols at runtime * regardless of the version we were compiled with */ - /* declare the struct for libbpf <= 0.6.0 -- it causes no harm on newer versions */ struct bpf_map_create_opts; diff --git a/src/shared/bpf-program.c b/src/shared/bpf-program.c index ac92ec8241..05a937cc50 100644 --- a/src/shared/bpf-program.c +++ b/src/shared/bpf-program.c @@ -138,7 +138,6 @@ int bpf_program_new_from_bpffs_path(const char *path, BPFProgram **ret) { return 0; } - int bpf_program_add_instructions(BPFProgram *p, const struct bpf_insn *instructions, size_t count) { assert(p); diff --git a/src/shared/creds-util.c b/src/shared/creds-util.c index 8cd7c9d7c5..762dfd675a 100644 --- a/src/shared/creds-util.c +++ b/src/shared/creds-util.c @@ -509,7 +509,6 @@ int get_credential_host_secret(CredentialSecretFlags flags, struct iovec *ret) { return log_debug_errno(errno, "Failed to open %s/%s: %m", dirname, filename); - r = make_credential_host_secret(dfd, machine_id, flags, dirname, filename, ret); if (r == -EEXIST) { log_debug_errno(r, "Credential secret %s/%s appeared while we were creating it, rereading.", diff --git a/src/shared/firewall-util-nft.c b/src/shared/firewall-util-nft.c index daf73c5b7b..1e02886430 100644 --- a/src/shared/firewall-util-nft.c +++ b/src/shared/firewall-util-nft.c @@ -620,7 +620,6 @@ static int nft_add_element( assert(key); assert(data || dlen == 0); - /* * Ideally there would be an API that provides: * diff --git a/src/shared/id128-print.c b/src/shared/id128-print.c index c9509b28f0..788be8089a 100644 --- a/src/shared/id128-print.c +++ b/src/shared/id128-print.c @@ -45,7 +45,6 @@ int id128_pretty_print_sample(const char *name, sd_id128_t id) { return 0; } - int id128_pretty_print(sd_id128_t id, Id128PrettyPrintMode mode) { assert(mode >= 0); assert(mode < _ID128_PRETTY_PRINT_MODE_MAX); diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index ec91b43ad5..0b28ce4117 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -1410,7 +1410,6 @@ typedef int (*output_func_t)( dual_timestamp *previous_display_ts, sd_id128_t *previous_boot_id); - static output_func_t output_funcs[_OUTPUT_MODE_MAX] = { [OUTPUT_SHORT] = output_short, [OUTPUT_SHORT_ISO] = output_short, @@ -1701,7 +1700,6 @@ int add_matches_for_user_unit_full(sd_journal *j, bool all, const char *unit) { (r = sd_journal_add_match(j, "_UID=0", SIZE_MAX)) ); - if (r == 0 && all && endswith(unit, ".slice")) /* Show all messages belonging to a slice */ (void) ( diff --git a/src/shared/tests.h b/src/shared/tests.h index 141bfe4f22..a7c2600d38 100644 --- a/src/shared/tests.h +++ b/src/shared/tests.h @@ -331,7 +331,6 @@ static inline int run_test_table(void) { } \ }) - #define ASSERT_FAIL(expr) \ ({ \ typeof(expr) _result = (expr); \ @@ -535,7 +534,6 @@ static inline int run_test_table(void) { } \ }) - #define ASSERT_EQ_ID128(expr1, expr2) \ ({ \ typeof(expr1) _expr1 = (expr1); \ diff --git a/src/shared/userdb.c b/src/shared/userdb.c index a35716c3d5..557de70ea8 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c @@ -911,7 +911,6 @@ int groupdb_by_name(const char *name, UserDBFlags flags, GroupRecord **ret) { return r; } - if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && !(iterator && iterator->nss_covered)) { r = userdb_iterator_block_nss_systemd(iterator); if (r >= 0) { diff --git a/src/ssh-generator/ssh-generator.c b/src/ssh-generator/ssh-generator.c index 842f0b3a94..f482828635 100644 --- a/src/ssh-generator/ssh-generator.c +++ b/src/ssh-generator/ssh-generator.c @@ -280,7 +280,6 @@ static int add_local_unix_socket( if (r < 0) return r; - log_info("Binding SSH to AF_UNIX socket /run/ssh-unix-local/socket.\n" "→ connect via 'ssh .host' locally"); return 0; diff --git a/src/systemctl/systemctl-util.c b/src/systemctl/systemctl-util.c index 0b5881ccbb..118b627e81 100644 --- a/src/systemctl/systemctl-util.c +++ b/src/systemctl/systemctl-util.c @@ -731,7 +731,6 @@ int unit_exists(LookupPaths *lp, const char *unit) { return !streq_ptr(info.load_state, "not-found") || !streq_ptr(info.active_state, "inactive"); } - int append_unit_dependencies(sd_bus *bus, char **names, char ***ret) { _cleanup_strv_free_ char **with_deps = NULL; diff --git a/src/sysupdate/sysupdate.c b/src/sysupdate/sysupdate.c index a80599c796..490466228d 100644 --- a/src/sysupdate/sysupdate.c +++ b/src/sysupdate/sysupdate.c @@ -508,7 +508,6 @@ static int context_show_version(Context *c, const char *version) { FLAGS_SET(us->flags, UPDATE_INSTALLED|UPDATE_PROTECTED) ? ansi_highlight() : "", yes_no(FLAGS_SET(us->flags, UPDATE_INSTALLED|UPDATE_PROTECTED)), ansi_normal(), us->flags & UPDATE_OBSOLETE ? ansi_highlight_red() : "", yes_no(us->flags & UPDATE_OBSOLETE), ansi_normal()); - t = table_new("type", "path", "ptuuid", "ptflags", "mtime", "mode", "size", "tries-done", "tries-left", "noauto", "ro", "growfs", "sha256"); if (!t) return log_oom(); @@ -694,7 +693,6 @@ static int context_show_version(Context *c, const char *version) { if (!have_sha256) (void) table_hide_column_from_display(t, 12); - if (FLAGS_SET(arg_json_format_flags, SD_JSON_FORMAT_OFF)) { printf("%s%s%s Version: %s\n" " State: %s%s%s\n" diff --git a/src/test/test-async.c b/src/test/test-async.c index ee6bae2698..ed5fec74d3 100644 --- a/src/test/test-async.c +++ b/src/test/test-async.c @@ -114,5 +114,4 @@ TEST(asynchronous_rm_rf) { } } - DEFINE_TEST_MAIN(LOG_DEBUG); diff --git a/src/test/test-barrier.c b/src/test/test-barrier.c index 1e0da59c48..f965a6c06d 100644 --- a/src/test/test-barrier.c +++ b/src/test/test-barrier.c @@ -415,7 +415,6 @@ TEST_BARRIER(barrier_pending_exit, }), TEST_BARRIER_WAIT_SUCCESS(pid2)); - static int intro(void) { if (!slow_tests_enabled()) return log_tests_skipped("slow tests are disabled"); diff --git a/src/test/test-bpf-devices.c b/src/test/test-bpf-devices.c index 3993c35aa4..ae6be16956 100644 --- a/src/test/test-bpf-devices.c +++ b/src/test/test-bpf-devices.c @@ -248,7 +248,6 @@ static void test_policy_empty(bool add_mismatched, const char *cgroup_path, BPFP assert_se(wrong == 0); } - int main(int argc, char *argv[]) { _cleanup_free_ char *cgroup = NULL, *parent = NULL; _cleanup_(rmdir_and_freep) char *controller_path = NULL; diff --git a/src/test/test-execute.c b/src/test/test-execute.c index b068c3aee0..9e3288b7a9 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -422,7 +422,6 @@ static void test_exec_execsearchpath_environment_files(Manager *m) { (void) unlink("/tmp/test-exec_environmentfile.conf"); - r = write_string_file("/tmp/test-exec_execsearchpath_environmentfile-set.conf", path_set, WRITE_STRING_FILE_CREATE); ASSERT_OK(r); diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c index 474eacaf04..d76ef679a1 100644 --- a/src/test/test-fileio.c +++ b/src/test/test-fileio.c @@ -1147,5 +1147,4 @@ TEST(fdopen_independent) { f = safe_fclose(f); } - DEFINE_TEST_MAIN(LOG_DEBUG); diff --git a/src/test/test-install-root.c b/src/test/test-install-root.c index 3a623a8761..090407b8e3 100644 --- a/src/test/test-install-root.c +++ b/src/test/test-install-root.c @@ -1327,5 +1327,4 @@ static int intro(void) { return EXIT_SUCCESS; } - DEFINE_TEST_MAIN_WITH_INTRO(LOG_INFO, intro); diff --git a/src/test/test-varlink-idl.c b/src/test/test-varlink-idl.c index af48216865..bdac083571 100644 --- a/src/test/test-varlink-idl.c +++ b/src/test/test-varlink-idl.c @@ -367,7 +367,6 @@ static SD_VARLINK_DEFINE_INTERFACE( &vl_method_TestMethod, &vl_method_Done); - static void* server_thread(void *userdata) { _cleanup_(sd_varlink_server_unrefp) sd_varlink_server *server = NULL; _cleanup_(sd_event_unrefp) sd_event *event = NULL; diff --git a/src/test/test-varlink.c b/src/test/test-varlink.c index a80344bcd1..17a78633cc 100644 --- a/src/test/test-varlink.c +++ b/src/test/test-varlink.c @@ -260,7 +260,6 @@ static void *thread(void *arg) { assert_se(sd_varlink_collect(c, "io.test.DoSomethingMore", wrong, &j, &error_id) >= 0); assert_se(strcmp_ptr(error_id, "org.varlink.service.InvalidParameter") == 0); - assert_se(sd_varlink_collect(c, "io.test.DoSomethingMore", i, &j, &error_id) >= 0); assert_se(!error_id); diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c index 4d13035173..ae9a11f45d 100644 --- a/src/udev/udev-builtin-blkid.c +++ b/src/udev/udev-builtin-blkid.c @@ -307,7 +307,6 @@ static int read_loopback_backing_inode( *ret_fname = TAKE_PTR(fn); return 1; - notloop: *ret_devno = 0; *ret_inode = 0; |