mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 13:27:33 +02:00
Fix some integer warnings in 64-bit builds
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Version 140:
|
||||||
|
|
||||||
|
* Fix some integer warnings in 64-bit builds
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Version 139:
|
Version 139:
|
||||||
|
|
||||||
* Revisit boost library min/max guidance
|
* Revisit boost library min/max guidance
|
||||||
|
@ -417,10 +417,10 @@ operator()()
|
|||||||
}
|
}
|
||||||
auto& r = sr_.reader_impl();
|
auto& r = sr_.reader_impl();
|
||||||
boost::winapi::DWORD_ const nNumberOfBytesToWrite =
|
boost::winapi::DWORD_ const nNumberOfBytesToWrite =
|
||||||
(std::min<boost::winapi::DWORD_>)(
|
static_cast<boost::winapi::DWORD_>(
|
||||||
beast::detail::clamp((std::min<std::uint64_t>)(
|
(std::min<std::uint64_t>)(
|
||||||
r.body_.last_ - r.pos_, sr_.limit())),
|
(std::min<std::uint64_t>)(r.body_.last_ - r.pos_, sr_.limit()),
|
||||||
2147483646);
|
(std::numeric_limits<boost::winapi::DWORD_>::max)()));
|
||||||
boost::asio::windows::overlapped_ptr overlapped{
|
boost::asio::windows::overlapped_ptr overlapped{
|
||||||
sock_.get_executor().context(), *this};
|
sock_.get_executor().context(), *this};
|
||||||
auto& ov = *overlapped.get();
|
auto& ov = *overlapped.get();
|
||||||
@ -514,10 +514,10 @@ write_some(
|
|||||||
if(ec)
|
if(ec)
|
||||||
return 0;
|
return 0;
|
||||||
boost::winapi::DWORD_ const nNumberOfBytesToWrite =
|
boost::winapi::DWORD_ const nNumberOfBytesToWrite =
|
||||||
(std::min<boost::winapi::DWORD_>)(
|
static_cast<boost::winapi::DWORD_>(
|
||||||
beast::detail::clamp((std::min<std::uint64_t>)(
|
(std::min<std::uint64_t>)(
|
||||||
r.body_.last_ - r.pos_, sr.limit())),
|
(std::min<std::uint64_t>)(r.body_.last_ - r.pos_, sr.limit()),
|
||||||
2147483646);
|
(std::numeric_limits<boost::winapi::DWORD_>::max)()));
|
||||||
auto const bSuccess = ::TransmitFile(
|
auto const bSuccess = ::TransmitFile(
|
||||||
sock.native_handle(),
|
sock.native_handle(),
|
||||||
r.body_.file_.native_handle(),
|
r.body_.file_.native_handle(),
|
||||||
|
@ -93,8 +93,7 @@ public:
|
|||||||
{
|
{
|
||||||
if(length)
|
if(length)
|
||||||
{
|
{
|
||||||
if(*length > (
|
if(static_cast<std::size_t>(*length) != *length)
|
||||||
std::numeric_limits<std::size_t>::max)())
|
|
||||||
{
|
{
|
||||||
ec = error::buffer_overflow;
|
ec = error::buffer_overflow;
|
||||||
return;
|
return;
|
||||||
|
@ -88,8 +88,7 @@ public:
|
|||||||
{
|
{
|
||||||
if(length)
|
if(length)
|
||||||
{
|
{
|
||||||
if(*length > (
|
if(static_cast<std::size_t>(*length) != *length)
|
||||||
std::numeric_limits<std::size_t>::max)())
|
|
||||||
{
|
{
|
||||||
ec = error::buffer_overflow;
|
ec = error::buffer_overflow;
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user