]> git.ipfire.org Git - people/ms/systemd.git/commitdiff
make gcc shut up
authorLennart Poettering <lennart@poettering.net>
Mon, 10 May 2010 01:34:31 +0000 (03:34 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 10 May 2010 01:34:31 +0000 (03:34 +0200)
execute.c
mount-setup.c
swap.c
util.c

index a7775a4ea9f552cdc1defeecf3ba941775373372..ef24f71a253d0f369c9644689bdcb2c2af73c1b8 100644 (file)
--- a/execute.c
+++ b/execute.c
@@ -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;
index 1b3d32bb37f9faf162ddf154907baccbe27b8511..cb91e181bf35ef62cfef9c23201a6b80a331cb58 100644 (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;
diff --git a/swap.c b/swap.c
index 5c161e10ca9b27e35e1b0eebf606bd8a3fefa37e..fffd0b9239e28a1a54c2b12e6bd5d8154271918d 100644 (file)
--- a/swap.c
+++ b/swap.c
@@ -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;
diff --git a/util.c b/util.c
index 8042214c8fae7fdd40494691d216624a26cfeee8..f5f1b3a45e642655217be276d8c7700c058c88a4 100644 (file)
--- a/util.c
+++ b/util.c
@@ -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);