make gcc shut up

This commit is contained in:
Lennart Poettering 2010-05-10 03:34:31 +02:00
parent 462b33e96a
commit bab4504448
4 changed files with 6 additions and 5 deletions

View File

@ -392,8 +392,8 @@ static int chown_terminal(int fd, uid_t uid) {
assert(fd >= 0);
/* This might fail. What matters are the results. */
fchown(fd, uid, -1);
fchmod(fd, TTY_MODE);
(void) fchown(fd, uid, -1);
(void) fchmod(fd, TTY_MODE);
if (fstat(fd, &st) < 0)
return -errno;

View File

@ -110,7 +110,7 @@ static int mount_cgroup_controllers(void) {
return -ENOENT;
/* Ignore the header line */
fgets(buf, sizeof(buf), f);
(void) fgets(buf, sizeof(buf), f);
for (;;) {
MountPoint p;

3
swap.c
View File

@ -318,7 +318,8 @@ static int swap_load_proc_swaps(Manager *m) {
Meta *meta;
rewind(m->proc_swaps);
fscanf(m->proc_self_mountinfo, "%*s %*s %*s %*s %*s\n");
(void) fscanf(m->proc_self_mountinfo, "%*s %*s %*s %*s %*s\n");
for (;;) {
char *dev = NULL, *d;

2
util.c
View File

@ -1597,7 +1597,7 @@ int flush_fd(int fd) {
}
int acquire_terminal(const char *name, bool fail, bool force) {
int fd = -1, notify = -1, r, wd;
int fd = -1, notify = -1, r, wd = -1;
assert(name);