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
This commit is contained in:
Ruediger Meier 2014-05-30 01:18:09 +02:00
parent 27e6e446b9
commit 60cb2c3720
7 changed files with 11 additions and 9 deletions

View file

@ -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"));