@@ -699,7 +699,7 @@ namespace web { namespace http
699
699
}
700
700
};
701
701
702
- const size_t readSize = std::min (client_config ().chunksize (), ctx->m_known_size - ctx->m_uploaded );
702
+ const auto readSize = static_cast < size_t >( std::min (static_cast < uint64_t >( client_config ().chunksize ()) , ctx->m_known_size - ctx->m_uploaded ) );
703
703
704
704
auto readbuf = ctx->_get_readbuffer ();
705
705
readbuf.getn (boost::asio::buffer_cast<uint8_t *>(ctx->m_body_buf .prepare (readSize)), readSize)
@@ -892,7 +892,7 @@ namespace web { namespace http
892
892
{
893
893
if (!needChunked)
894
894
{
895
- async_read_until_buffersize (std::min (ctx->m_known_size , client_config ().chunksize ()),
895
+ async_read_until_buffersize (static_cast < size_t >( std::min (ctx->m_known_size , static_cast < uint64_t >( client_config ().chunksize ()) )),
896
896
boost::bind (&linux_client::handle_read_content, shared_from_this (), boost::asio::placeholders::error, ctx), ctx);
897
897
}
898
898
else
@@ -1069,7 +1069,7 @@ namespace web { namespace http
1069
1069
1070
1070
// more data need to be read
1071
1071
writeBuffer.putn (boost::asio::buffer_cast<const uint8_t *>(ctx->m_body_buf .data ()),
1072
- std::min (ctx->m_body_buf .size (), ctx->m_known_size - ctx->m_downloaded ))
1072
+ static_cast < size_t >( std::min (static_cast < uint64_t >( ctx->m_body_buf .size ()) , ctx->m_known_size - ctx->m_downloaded ) ))
1073
1073
.then ([=](pplx::task<size_t > op)
1074
1074
{
1075
1075
size_t writtenSize = 0 ;
@@ -1079,7 +1079,7 @@ namespace web { namespace http
1079
1079
ctx->m_downloaded += static_cast <uint64_t >(writtenSize);
1080
1080
ctx->m_body_buf .consume (writtenSize);
1081
1081
1082
- async_read_until_buffersize (std::min (client_config ().chunksize (), ctx->m_known_size - ctx->m_downloaded ),
1082
+ async_read_until_buffersize (static_cast < size_t >( std::min (static_cast < uint64_t >( client_config ().chunksize ()) , ctx->m_known_size - ctx->m_downloaded ) ),
1083
1083
boost::bind (&linux_client::handle_read_content, shared_from_this (), boost::asio::placeholders::error, ctx), ctx);
1084
1084
}
1085
1085
catch (...)
0 commit comments