diff --git a/include/llfio/v2.0/detail/impl/windows/file_handle.ipp b/include/llfio/v2.0/detail/impl/windows/file_handle.ipp index d3417b61a..721641a49 100644 --- a/include/llfio/v2.0/detail/impl/windows/file_handle.ipp +++ b/include/llfio/v2.0/detail/impl/windows/file_handle.ipp @@ -718,7 +718,7 @@ result file_handle::clone_extents_to(file_handle::exte buffer = utils::page_allocator().allocate(blocksize); } deadline nd; - buffer_type b(buffer, utils::round_up_to_page_size(thisblock, 4096) /* to allow aligned i/o files */); + buffer_type b(buffer, utils::round_up_to_page_size((size_t) thisblock, 4096) /* to allow aligned i/o files */); LLFIO_DEADLINE_TO_PARTIAL_DEADLINE(nd, d); OUTCOME_TRY(auto &&readed, read({{&b, 1}, item.src.offset + thisoffset}, nd)); buffer_dirty = true; @@ -726,9 +726,9 @@ result file_handle::clone_extents_to(file_handle::exte { return errc::resource_unavailable_try_again; // something is wrong } - readed.front() = {readed.front().data(), thisblock}; + readed.front() = {readed.front().data(), (size_t) thisblock}; LLFIO_DEADLINE_TO_PARTIAL_DEADLINE(nd, d); - const_buffer_type cb(readed.front().data(), thisblock); + const_buffer_type cb(readed.front().data(), (size_t) thisblock); if(item.destination_extents_are_new) { // If we don't need to reset the bytes in the destination, try to elide diff --git a/include/llfio/v2.0/detail/impl/windows/map_handle.ipp b/include/llfio/v2.0/detail/impl/windows/map_handle.ipp index b10539c32..3a8dd9051 100644 --- a/include/llfio/v2.0/detail/impl/windows/map_handle.ipp +++ b/include/llfio/v2.0/detail/impl/windows/map_handle.ipp @@ -693,7 +693,7 @@ result map_handle::map(section_handle §ion, size_type bytes, ext } if(bytes == 0u) { - bytes = length; + bytes = (size_type) length; } else if(length > bytes) { @@ -718,7 +718,7 @@ result map_handle::map(section_handle §ion, size_type bytes, ext ret.value()._addr = static_cast(addr); ret.value()._offset = offset; ret.value()._reservation = _bytes - (offset & 65535); - ret.value()._length = length; + ret.value()._length = (size_type) length; ret.value()._pagesize = pagesize; // Make my handle borrow the native handle of my backing storage ret.value()._v.h = section.backing_native_handle().h; @@ -800,7 +800,7 @@ result map_handle::truncate(size_type newsize, bool /* un // If newsize isn't exactly a previous extension, this will fail, same as for the VirtualAlloc case OUTCOME_TRY(win32_release_file_allocations(_addr + newsize, _reservation - newsize)); _reservation = newsize; - _length = length; + _length = (size_type) length; return _reservation; } // Try to map an additional part of the section directly after this map @@ -818,7 +818,7 @@ result map_handle::truncate(size_type newsize, bool /* un return ntkernel_error(ntstat); } _reservation += _bytes; - _length = length; + _length = (size_type) length; return _reservation; }