From: Lennart Poettering Date: Tue, 27 Oct 2020 08:55:59 +0000 (+0100) Subject: tree-wide: cast result of get_process_comm() to (void) where we ignore it X-Git-Tag: v247-rc2~54 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=74d6421da08ff2ef4b081644438c3eb86d17eac6;p=thirdparty%2Fsystemd.git tree-wide: cast result of get_process_comm() to (void) where we ignore it --- diff --git a/src/core/automount.c b/src/core/automount.c index 9c0dca1b3a7..16b9104171c 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -989,7 +989,7 @@ static int automount_dispatch_io(sd_event_source *s, int fd, uint32_t events, vo if (packet.v5_packet.pid > 0) { _cleanup_free_ char *p = NULL; - get_process_comm(packet.v5_packet.pid, &p); + (void) get_process_comm(packet.v5_packet.pid, &p); log_unit_info(UNIT(a), "Got automount request for %s, triggered by %"PRIu32" (%s)", a->where, packet.v5_packet.pid, strna(p)); } else log_unit_debug(UNIT(a), "Got direct mount request on %s", a->where); diff --git a/src/core/killall.c b/src/core/killall.c index 0272fdb0da5..2b259985dcb 100644 --- a/src/core/killall.c +++ b/src/core/killall.c @@ -214,7 +214,7 @@ static int killall(int sig, Set *pids, bool send_sighup) { if (sig == SIGKILL) { _cleanup_free_ char *s = NULL; - get_process_comm(pid, &s); + (void) get_process_comm(pid, &s); log_notice("Sending SIGKILL to PID "PID_FMT" (%s).", pid, strna(s)); } diff --git a/src/journal/journald-console.c b/src/journal/journald-console.c index 80e29585978..9497ef9a4af 100644 --- a/src/journal/journald-console.c +++ b/src/journal/journald-console.c @@ -66,7 +66,7 @@ void server_forward_console( /* Second: identifier and PID */ if (ucred) { if (!identifier) { - get_process_comm(ucred->pid, &ident_buf); + (void) get_process_comm(ucred->pid, &ident_buf); identifier = ident_buf; } diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c index 6e7c806fd82..ca60f398c89 100644 --- a/src/journal/journald-kmsg.c +++ b/src/journal/journald-kmsg.c @@ -58,7 +58,7 @@ void server_forward_kmsg( /* Second: identifier and PID */ if (ucred) { if (!identifier) { - get_process_comm(ucred->pid, &ident_buf); + (void) get_process_comm(ucred->pid, &ident_buf); identifier = ident_buf; } diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c index 46013c38784..0da7dcfcf56 100644 --- a/src/journal/journald-syslog.c +++ b/src/journal/journald-syslog.c @@ -153,7 +153,7 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons /* Third: identifier and PID */ if (ucred) { if (!identifier) { - get_process_comm(ucred->pid, &ident_buf); + (void) get_process_comm(ucred->pid, &ident_buf); identifier = ident_buf; } diff --git a/src/journal/journald-wall.c b/src/journal/journald-wall.c index 370c9b32e2d..6134ba7414e 100644 --- a/src/journal/journald-wall.c +++ b/src/journal/journald-wall.c @@ -27,7 +27,7 @@ void server_forward_wall( if (ucred) { if (!identifier) { - get_process_comm(ucred->pid, &ident_buf); + (void) get_process_comm(ucred->pid, &ident_buf); identifier = ident_buf; } diff --git a/src/login/loginctl.c b/src/login/loginctl.c index b7f400dc5e2..28afc1bd093 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -485,7 +485,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li printf("\t Leader: %"PRIu32, i.leader); - get_process_comm(i.leader, &t); + (void) get_process_comm(i.leader, &t); if (t) printf(" (%s)", t); diff --git a/src/systemctl/systemctl-logind.c b/src/systemctl/systemctl-logind.c index 20486c968ea..7cd727986b1 100644 --- a/src/systemctl/systemctl-logind.c +++ b/src/systemctl/systemctl-logind.c @@ -146,7 +146,7 @@ int logind_check_inhibitors(enum action a) { ACTION_KEXEC) ? "shutdown" : "sleep")) continue; - get_process_comm(pid, &comm); + (void) get_process_comm(pid, &comm); user = uid_to_name(uid); log_warning("Operation inhibited by \"%s\" (PID "PID_FMT" \"%s\", user %s), reason is \"%s\".",