mdbx: fix MSVC warning.

More for https://github.com/erthink/libmdbx/issues/166

Change-Id: I47a2ec72831c06695e7ef4c52a77039e52a718e2
This commit is contained in:
Leonid Yuriev 2021-03-09 12:59:48 +03:00
parent cd90f831af
commit fd021d793a

View File

@ -68,7 +68,7 @@ MDBX_NOTHROW_CONST_FUNCTION static __inline uint16_t v2me(size_t v,
unsigned e) {
assert(v > (e ? me2v(2047, e - 1) : 32768));
assert(v <= me2v(2047, e));
size_t m = (v - 32768 + (1 << (e + 5)) - 1) >> (e + 5);
size_t m = (v - 32768 + ((size_t)1 << (e + 5)) - 1) >> (e + 5);
m -= m > 0;
assert(m < 2048 && e < 8);
// f e d c b a 9 8 7 6 5 4 3 2 1 0