tree-wide: add more void casts for various syscall invocations
This commit is contained in:
+2
-2
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user