mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 22:22:00 +00:00
Fix build in gcc9
This commit is contained in:
parent
c03032174b
commit
7695ff8035
@ -254,7 +254,7 @@ void ReadBufferAIO::prepare()
|
||||
/// Region of the disk from which we want to read data.
|
||||
const off_t region_begin = first_unread_pos_in_file;
|
||||
|
||||
if ((requested_byte_count > std::numeric_limits<off_t>::max()) ||
|
||||
if ((static_cast<off_t>(requested_byte_count) > std::numeric_limits<off_t>::max()) ||
|
||||
(first_unread_pos_in_file > (std::numeric_limits<off_t>::max() - static_cast<off_t>(requested_byte_count))))
|
||||
throw Exception("An overflow occurred during file operation", ErrorCodes::LOGICAL_ERROR);
|
||||
|
||||
|
@ -274,7 +274,7 @@ void WriteBufferAIO::prepare()
|
||||
/// Region of the disk in which we want to write data.
|
||||
const off_t region_begin = pos_in_file;
|
||||
|
||||
if ((flush_buffer.offset() > std::numeric_limits<off_t>::max()) ||
|
||||
if ((static_cast<off_t>(flush_buffer.offset()) > std::numeric_limits<off_t>::max()) ||
|
||||
(pos_in_file > (std::numeric_limits<off_t>::max() - static_cast<off_t>(flush_buffer.offset()))))
|
||||
throw Exception("An overflow occurred during file operation", ErrorCodes::LOGICAL_ERROR);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user