From b211145688802492e4783478e51758156cfc2f59 Mon Sep 17 00:00:00 2001 From: Billy O'Neal Date: Mon, 8 Oct 2018 19:44:59 -0700 Subject: [PATCH] Fix narrowing conversion warnings on Windows. (#895) --- Release/src/http/client/http_client_winhttp.cpp | 2 +- Release/src/http/common/http_msg.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Release/src/http/client/http_client_winhttp.cpp b/Release/src/http/client/http_client_winhttp.cpp index 0a135d039e..ab415bb8b4 100644 --- a/Release/src/http/client/http_client_winhttp.cpp +++ b/Release/src/http/client/http_client_winhttp.cpp @@ -1583,7 +1583,7 @@ class winhttp_client final : public _http_client_communicator else if (length > p_request_context->m_remaining_to_write) { // The stream grew, but we won't - length = p_request_context->m_remaining_to_write; + length = static_cast(p_request_context->m_remaining_to_write); } do_compress(pplx::task_from_result(length)).then(after_read); diff --git a/Release/src/http/common/http_msg.cpp b/Release/src/http/common/http_msg.cpp index d17d09dcef..7a80017828 100644 --- a/Release/src/http/common/http_msg.cpp +++ b/Release/src/http/common/http_msg.cpp @@ -319,7 +319,7 @@ size_t http_msg_base::_get_stream_length() auto offset = stream.tell(); auto end = stream.seek(0, std::ios_base::end); stream.seek(offset); - return static_cast(end - offset); + return static_cast(end - offset); } return std::numeric_limits::max();