[systemd-commits] execute.c mount-setup.c swap.c util.c

Lennart Poettering lennart at kemper.freedesktop.org
Sun May 9 18:34:37 PDT 2010


 execute.c     |    4 ++--
 mount-setup.c |    2 +-
 swap.c        |    3 ++-
 util.c        |    2 +-
 4 files changed, 6 insertions(+), 5 deletions(-)

New commits:
commit bab45044482dc012331c768c08d78a2d006485ad
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon May 10 03:34:31 2010 +0200

    make gcc shut up

diff --git a/execute.c b/execute.c
index a7775a4..ef24f71 100644
--- 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;
diff --git a/mount-setup.c b/mount-setup.c
index 1b3d32b..cb91e18 100644
--- a/mount-setup.c
+++ b/mount-setup.c
@@ -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 5c161e1..fffd0b9 100644
--- 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 8042214..f5f1b3a 100644
--- 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);
 


More information about the systemd-commits mailing list