From ac5b0c13d8023745c0fbdaaa95dcec5b7b21d1e2 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 14 Oct 2015 19:32:46 +0200 Subject: tree-wide: add more void casts for various syscall invocations --- src/core/manager.c | 4 ++-- src/core/service.c | 2 +- src/journal/journald-server.c | 2 +- src/timesync/timesyncd.c | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/core/manager.c b/src/core/manager.c index b2d56e88a7..6ae836148d 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2952,9 +2952,9 @@ void manager_set_show_status(Manager *m, ShowStatus mode) { m->show_status = mode; if (mode > 0) - touch("/run/systemd/show-status"); + (void) touch("/run/systemd/show-status"); else - unlink("/run/systemd/show-status"); + (void) unlink("/run/systemd/show-status"); } static bool manager_get_show_status(Manager *m, StatusType type) { diff --git a/src/core/service.c b/src/core/service.c index 1e4f707bf4..c77d4dc796 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1215,7 +1215,7 @@ static int service_spawn( if (is_control && UNIT(s)->cgroup_path) { path = strjoina(UNIT(s)->cgroup_path, "/control"); - cg_create(SYSTEMD_CGROUP_CONTROLLER, path); + (void) cg_create(SYSTEMD_CGROUP_CONTROLLER, path); } else path = UNIT(s)->cgroup_path; diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 2d2a215f5d..62a5a2ad40 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -1231,7 +1231,7 @@ static int dispatch_sigusr1(sd_event_source *es, const struct signalfd_siginfo * server_sync(s); server_vacuum(s, false, false); - touch("/run/systemd/journal/flushed"); + (void) touch("/run/systemd/journal/flushed"); return 0; } diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c index 3cb7d435cd..722b349b81 100644 --- a/src/timesync/timesyncd.c +++ b/src/timesync/timesyncd.c @@ -57,12 +57,12 @@ static int load_clock_timestamp(uid_t uid, gid_t gid) { /* Try to fix the access mode, so that we can still touch the file after dropping priviliges */ - fchmod(fd, 0644); - fchown(fd, uid, gid); + (void) fchmod(fd, 0644); + (void) fchown(fd, uid, gid); } else /* create stamp file with the compiled-in date */ - touch_file("/var/lib/systemd/clock", true, min, uid, gid, 0644); + (void) touch_file("/var/lib/systemd/clock", true, min, uid, gid, 0644); ct = now(CLOCK_REALTIME); if (ct < min) { @@ -150,7 +150,7 @@ int main(int argc, char *argv[]) { /* if we got an authoritative time, store it in the file system */ if (m->sync) - touch("/var/lib/systemd/clock"); + (void) touch("/var/lib/systemd/clock"); sd_event_get_exit_code(m->event, &r); -- cgit v1.2.3-54-g00ecf