修复编译警告

This commit is contained in:
ziyue 2022-02-11 11:13:43 +08:00
parent 8338773767
commit d541ed2572

View File

@ -122,7 +122,7 @@ HttpFileBody::HttpFileBody(const string &file_path, bool use_mmap) {
}
void HttpFileBody::setRange(uint64_t offset, uint64_t max_size) {
CHECK(offset <= _read_to && max_size + offset <= _read_to);
CHECK((int64_t)offset <= _read_to && (int64_t)(max_size + offset) <= _read_to);
_read_to = max_size + offset;
_file_offset = offset;
if (_fp && !_map_addr) {