mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-19 22:22:00 +00:00
was wrong!
../dbms/src/IO/WriteBufferAIO.cpp:277:54: error: result of comparison 'ssize_t' (aka 'long') > 9223372036854775807 is always false [-Werror,-Wtautological-type-limit-compare] if ((static_cast<ssize_t>(flush_buffer.offset()) > std::numeric_limits<off_t>::max()) || ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
b89c38f0f0
commit
a5e2a725d2
@ -4,7 +4,7 @@ endif ()
|
|||||||
|
|
||||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/mimalloc/include/mimalloc.h")
|
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/mimalloc/include/mimalloc.h")
|
||||||
message (WARNING "submodule contrib/mimalloc is missing. to fix try run: \n git submodule update --init --recursive")
|
message (WARNING "submodule contrib/mimalloc is missing. to fix try run: \n git submodule update --init --recursive")
|
||||||
return ()
|
return()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (ENABLE_MIMALLOC)
|
if (ENABLE_MIMALLOC)
|
||||||
|
@ -254,7 +254,7 @@ void ReadBufferAIO::prepare()
|
|||||||
/// Region of the disk from which we want to read data.
|
/// Region of the disk from which we want to read data.
|
||||||
const off_t region_begin = first_unread_pos_in_file;
|
const off_t region_begin = first_unread_pos_in_file;
|
||||||
|
|
||||||
if ((static_cast<ssize_t>(requested_byte_count) > std::numeric_limits<off_t>::max()) ||
|
if ((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))))
|
(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);
|
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.
|
/// Region of the disk in which we want to write data.
|
||||||
const off_t region_begin = pos_in_file;
|
const off_t region_begin = pos_in_file;
|
||||||
|
|
||||||
if ((static_cast<ssize_t>(flush_buffer.offset()) > std::numeric_limits<off_t>::max()) ||
|
if ((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()))))
|
(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);
|
throw Exception("An overflow occurred during file operation", ErrorCodes::LOGICAL_ERROR);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user