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

Unified Diff: base/files/file_enumerator_win.cc

Issue 1246833003: Fix and enable MSVC warning C4018 for base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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/debug/gdi_debug_util_win.cc ('k') | base/synchronization/waitable_event_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_enumerator_win.cc
diff --git a/base/files/file_enumerator_win.cc b/base/files/file_enumerator_win.cc
index ae41a4600d31568ec66cc2d0d4705b86a48be171..90db7f5729efc624b76b0f328bfcfdac86793055 100644
--- a/base/files/file_enumerator_win.cc
+++ b/base/files/file_enumerator_win.cc
@@ -30,7 +30,8 @@ int64 FileEnumerator::FileInfo::GetSize() const {
ULARGE_INTEGER size;
size.HighPart = find_data_.nFileSizeHigh;
size.LowPart = find_data_.nFileSizeLow;
- DCHECK_LE(size.QuadPart, std::numeric_limits<int64>::max());
+ DCHECK_LE(size.QuadPart,
+ static_cast<ULONGLONG>(std::numeric_limits<int64>::max()));
Nico 2015/07/20 23:39:27 Does std::numeric_limits<ULONGLONG>::max() not wor
Peter Kasting 2015/07/20 23:45:50 That's not correct. We're going to cast a ULONGLO
Nico 2015/07/20 23:48:09 Ah, I see.
return static_cast<int64>(size.QuadPart);
}
« no previous file with comments | « base/debug/gdi_debug_util_win.cc ('k') | base/synchronization/waitable_event_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698