]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: add more void casts for various syscall invocations
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Oct 2015 17:32:46 +0000 (19:32 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 19 Oct 2015 21:07:18 +0000 (23:07 +0200)
src/core/manager.c
src/core/service.c
src/journal/journald-server.c
src/timesync/timesyncd.c

index b2d56e88a7dcf2a7d1002f131b2d8c13bca13eb6..6ae836148d19daf03212315e68b289b1c01fca83 100644 (file)
@@ -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) {
index 1e4f707bf4fef56c6327f87ff54f2948f93d4a7e..c77d4dc796143453105c15976500c2594d0b6660 100644 (file)
@@ -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;
 
index 2d2a215f5d0db0e2867d721a04cbbb54c898701b..62a5a2ad403b9bdbf3d3ae6edcabe439c5b26740 100644 (file)
@@ -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;
 }
index 3cb7d435cd5a08e9873718727824f4ad33ee8af1..722b349b8192f420195c6912f02559a5daf507c5 100644 (file)
@@ -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);