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

Unified Diff: base/sync_socket_win.cc

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 years, 3 months 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
« no previous file with comments | « base/strings/utf_string_conversion_utils.cc ('k') | base/test/gtest_xml_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sync_socket_win.cc
diff --git a/base/sync_socket_win.cc b/base/sync_socket_win.cc
index c07e62a6120d9a4f837b4690e5c1d34fd9b494b8..a8deedb43d311bd6264feded98f68fc812527e21 100644
--- a/base/sync_socket_win.cc
+++ b/base/sync_socket_win.cc
@@ -151,9 +151,10 @@ size_t CancelableFileOperation(Function operation,
HANDLE events[] = { io_event->handle(), cancel_event->handle() };
const int wait_result = WaitForMultipleObjects(
ARRAYSIZE_UNSAFE(events), events, FALSE,
- timeout_in_ms == INFINITE
- ? timeout_in_ms
- : (finish_time - current_time).InMilliseconds());
+ timeout_in_ms == INFINITE ?
+ timeout_in_ms :
+ static_cast<DWORD>(
+ (finish_time - current_time).InMilliseconds()));
if (wait_result != WAIT_OBJECT_0 + 0) {
// CancelIo() doesn't synchronously cancel outstanding IO, only marks
// outstanding IO for cancellation. We must call GetOverlappedResult()
@@ -328,7 +329,8 @@ size_t CancelableSyncSocket::ReceiveWithTimeout(void* buffer,
TimeDelta timeout) {
return CancelableFileOperation(
&ReadFile, handle_, reinterpret_cast<char*>(buffer), length,
- &file_operation_, &shutdown_event_, this, timeout.InMilliseconds());
+ &file_operation_, &shutdown_event_, this,
+ static_cast<DWORD>(timeout.InMilliseconds()));
}
// static
« no previous file with comments | « base/strings/utf_string_conversion_utils.cc ('k') | base/test/gtest_xml_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698