diff options
author | Ruediger Meier | 2014-05-30 01:18:09 +0200 |
---|---|---|
committer | Ruediger Meier | 2014-05-30 01:18:09 +0200 |
commit | 60cb2c37201a453a76ea12e4d4b48f7b34ebef2c (patch) | |
tree | 85ffda2c6658fb51db06b8363feecd4e39cb3879 /sys-utils | |
parent | lslogins: fix pretty-print columns (diff) | |
download | kernel-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')
-rw-r--r-- | sys-utils/losetup.c | 2 | ||||
-rw-r--r-- | sys-utils/lscpu-dmi.c | 2 | ||||
-rw-r--r-- | sys-utils/switch_root.c | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c index ecba8a56c..6ad94be4c 100644 --- a/sys-utils/losetup.c +++ b/sys-utils/losetup.c @@ -77,7 +77,6 @@ static struct colinfo infos[] = { static int columns[NCOLS] = {-1}; static int ncolumns; -static int verbose; static int get_column_id(int num) { @@ -543,7 +542,6 @@ int main(int argc, char **argv) showdev = 1; break; case 'v': - verbose = 1; break; case 'V': printf(UTIL_LINUX_VERSION); diff --git a/sys-utils/lscpu-dmi.c b/sys-utils/lscpu-dmi.c index c82bfc134..251d4acc4 100644 --- a/sys-utils/lscpu-dmi.c +++ b/sys-utils/lscpu-dmi.c @@ -168,6 +168,7 @@ done: return rc; } +#if defined(__x86_64__) || defined(__i386__) static int hypervisor_decode_legacy(uint8_t *buf, const char *devmem) { if (!checksum(buf, 0x0F)) @@ -177,6 +178,7 @@ static int hypervisor_decode_legacy(uint8_t *buf, const char *devmem) WORD(buf + 0x0C), devmem); } +#endif static int hypervisor_decode_smbios(uint8_t *buf, const char *devmem) { 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")); |