mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
clang: implicit conversion from 'long' to 'double'
implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808. So rather compare same integer types.
This commit is contained in:
parent
d3d06f8ca0
commit
485a1961e8
@ -683,10 +683,10 @@ static int _size_arg(struct cmd_context *cmd __attribute__((unused)),
|
||||
return 0;
|
||||
}
|
||||
|
||||
av->i_value = (v < INT32_MAX) ? (int32_t) v : INT32_MAX;
|
||||
av->ui_value = (v < UINT32_MAX) ? (uint32_t) v : UINT32_MAX;
|
||||
av->i64_value = (v < INT64_MAX) ? (int64_t) v : INT64_MAX;
|
||||
av->ui64_value = (v < UINT64_MAX) ? (uint64_t) v : UINT64_MAX;
|
||||
av->i_value = ((int32_t) v < INT32_MAX) ? (int32_t) v : INT32_MAX;
|
||||
av->ui_value = ((uint32_t) v < UINT32_MAX) ? (uint32_t) v : UINT32_MAX;
|
||||
av->i64_value = ((int64_t) v < INT64_MAX) ? (int64_t) v : INT64_MAX;
|
||||
av->ui64_value = ((uint64_t) v < UINT64_MAX) ? (uint64_t) v : UINT64_MAX;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user