diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-12 11:47:21 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2016-04-12 11:47:51 +0200 |
commit | 1be74cfd7f948123544872abb5e80994182e04d8 (patch) | |
tree | 94716862b06e4be9b5f1c36675ba375820869458 | |
parent | 0f7975cb351158d3b2245b4262761a698c6c5d7b (diff) | |
download | lvm2-1be74cfd7f948123544872abb5e80994182e04d8.tar.gz |
cleanup: gcc warn about comparing int with uint
-rw-r--r-- | daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c | 4 | ||||
-rw-r--r-- | lib/activate/dev_manager.c | 2 | ||||
-rw-r--r-- | libdm/ioctl/libdm-iface.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c index 26fdfed64..7b060eda9 100644 --- a/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c +++ b/daemons/dmeventd/plugins/snapshot/dmeventd_snapshot.c @@ -148,8 +148,8 @@ static void _umount(const char *device, int major, int minor) continue; /* can't stat, skip this one */ if (S_ISBLK(st.st_mode) && - major(st.st_rdev) == major && - minor(st.st_rdev) == minor) { + (int) major(st.st_rdev) == major && + (int) minor(st.st_rdev) == minor) { log_error("Unmounting invalid snapshot %s from %s.", device, words[1]); if (!_run(UMOUNT_COMMAND, "-fl", words[1], NULL)) log_error("Failed to umount snapshot %s from %s: %s.", diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 3f916542b..a0e05ad6c 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -1687,7 +1687,7 @@ static int _add_dev_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, /* * FIXME compare info.major with lv->major if multiple major support */ - if (info.exists && (info.minor != lv->minor)) { + if (info.exists && ((int) info.minor != lv->minor)) { log_error("Volume %s (%" PRIu32 ":%" PRIu32")" " differs from already active device " "(%" PRIu32 ":%" PRIu32")", diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c index 2733b86b1..0c798f524 100644 --- a/libdm/ioctl/libdm-iface.c +++ b/libdm/ioctl/libdm-iface.c @@ -1169,9 +1169,9 @@ static struct dm_ioctl *_flatten(struct dm_task *dmt, unsigned repeat_count) } if (!_dm_multiple_major_support && dmt->allow_default_major_fallback && - dmt->major != _dm_device_major) { - log_verbose("Overriding major number of %" PRIu32 - " with %" PRIu32 " for persistent device.", + dmt->major != (int) _dm_device_major) { + log_verbose("Overriding major number of %d " + "with %u for persistent device.", dmt->major, _dm_device_major); dmt->major = _dm_device_major; } |