mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-30 10:50:34 +03:00
cleanup: gcc warn about comparing int with uint
This commit is contained in:
parent
0f7975cb35
commit
1be74cfd7f
@ -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.",
|
||||
|
@ -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")",
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user