Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ned14/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-12-08 22:45:41 +0300
committerNiall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com>2021-12-08 22:45:41 +0300
commitfba45d6bacbdc7710e257a0b3d229fe3ef3a1f5d (patch)
treea73e10b07a2fcae28823068f5a258f07cb21c0f7
parent48ac6664f123ca1072750f8c0169824683cf6aaf (diff)
Fix x86 build error and warnings on Windows.all_tests_passed_fba45d6bacbdc7710e257a0b3d229fe3ef3a1f5d
-rw-r--r--include/llfio/v2.0/detail/impl/windows/file_handle.ipp6
-rw-r--r--include/llfio/v2.0/detail/impl/windows/map_handle.ipp8
2 files changed, 7 insertions, 7 deletions
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 d3417b61..721641a4 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::extent_pair> file_handle::clone_extents_to(file_handle::exte
buffer = utils::page_allocator<byte>().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::extent_pair> 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 b10539c3..3a8dd905 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_handle::map(section_handle &section, 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_handle::map(section_handle &section, size_type bytes, ext
ret.value()._addr = static_cast<byte *>(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::size_type> 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::size_type> map_handle::truncate(size_type newsize, bool /* un
return ntkernel_error(ntstat);
}
_reservation += _bytes;
- _length = length;
+ _length = (size_type) length;
return _reservation;
}