summaryrefslogtreecommitdiffstats
path: root/sys-utils/switch_root.c
diff options
context:
space:
mode:
authorRuediger Meier2014-05-30 01:18:09 +0200
committerRuediger Meier2014-05-30 01:18:09 +0200
commit60cb2c37201a453a76ea12e4d4b48f7b34ebef2c (patch)
tree85ffda2c6658fb51db06b8363feecd4e39cb3879 /sys-utils/switch_root.c
parentlslogins: fix pretty-print columns (diff)
downloadkernel-qcow2-util-linux-60cb2c37201a453a76ea12e4d4b48f7b34ebef2c.tar.gz
kernel-qcow2-util-linux-60cb2c37201a453a76ea12e4d4b48f7b34ebef2c.tar.xz
kernel-qcow2-util-linux-60cb2c37201a453a76ea12e4d4b48f7b34ebef2c.zip
build: fix some compiler warnings
Most of them catched on 32bit gcc and icc. disk-utils/fsck.cramfs.c: printf format type lib/boottime.c: unused variables misc-utils/cal.c: set but never used sys-utils/losetup.c: set but never used sys-utils/lscpu-dmi.c: defined but not used sys-utils/switch_root.c: comparison between signed and unsigned tests/helpers/test_sysinfo.c: printf format type
Diffstat (limited to 'sys-utils/switch_root.c')
-rw-r--r--sys-utils/switch_root.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys-utils/switch_root.c b/sys-utils/switch_root.c
index dac946f8c..6822a5d0c 100644
--- a/sys-utils/switch_root.c
+++ b/sys-utils/switch_root.c
@@ -181,7 +181,8 @@ static int switchroot(const char *newroot)
if (pid <= 0) {
struct statfs stfs;
if (fstatfs(cfd, &stfs) == 0 &&
- (stfs.f_type == STATFS_RAMFS_MAGIC || stfs.f_type == STATFS_TMPFS_MAGIC))
+ (stfs.f_type == (__SWORD_TYPE)STATFS_RAMFS_MAGIC ||
+ stfs.f_type == (__SWORD_TYPE)STATFS_TMPFS_MAGIC))
recursiveRemove(cfd);
else
warn(_("old root filesystem is not an initramfs"));