Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Unified Diff: net/base/upload_bytes_element_reader.cc

Issue 760703002: Fix "value possibly truncated" warnings on MSVC, net/base edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/upload_bytes_element_reader.cc
diff --git a/net/base/upload_bytes_element_reader.cc b/net/base/upload_bytes_element_reader.cc
index 6927d8ea7c27b5c3ccc1109d7e6525cd1041d10a..44f61f4f8490b9738133812d388a2d2a69abcd38 100644
--- a/net/base/upload_bytes_element_reader.cc
+++ b/net/base/upload_bytes_element_reader.cc
@@ -48,8 +48,8 @@ int UploadBytesElementReader::Read(IOBuffer* buf,
const CompletionCallback& callback) {
DCHECK_LT(0, buf_length);
- const size_t num_bytes_to_read =
- std::min(BytesRemaining(), static_cast<uint64>(buf_length));
+ const int num_bytes_to_read = static_cast<int>(
+ std::min(BytesRemaining(), static_cast<uint64>(buf_length)));
// Check if we have anything to copy first, because we are getting
// the address of an element in |bytes_| and that will throw an

Powered by Google App Engine
This is Rietveld 408576698