Commit e3f653ca authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-34750 fixup: -Wconversion on 32-bit

log_t::resize_write_buf(): If d<0 and d>-length, d will fit in ssize_t,
which is a signed 32-bit or 64-bit integer. Cast from int64_t to ssize_t
to make this clear and to silence a compiler warning.
parent a8c57172
...@@ -787,13 +787,13 @@ void log_t::resize_write_buf(const byte *b, size_t length) noexcept ...@@ -787,13 +787,13 @@ void log_t::resize_write_buf(const byte *b, size_t length) noexcept
ut_ad(length <= resize_target); ut_ad(length <= resize_target);
int64_t d= int64_t(write_lsn - resize_in_progress()); int64_t d= int64_t(write_lsn - resize_in_progress());
if (UNIV_UNLIKELY(d <= 0)) if (UNIV_UNLIKELY(d < 0))
{ {
d&= ~int64_t(block_size_1); d&= ~int64_t(block_size_1);
if (int64_t(d + length) <= 0) if (int64_t(d + length) <= 0)
return; return;
length+= d; length+= ssize_t(d);
b-= d; b-= ssize_t(d);
d= 0; d= 0;
} }
lsn_t offset= START_OFFSET + (lsn_t(d) & ~lsn_t{block_size_1}) % lsn_t offset= START_OFFSET + (lsn_t(d) & ~lsn_t{block_size_1}) %
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment