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

Unified Diff: chrome/browser/private_working_set_snapshot_win.cc

Issue 1513043002: clang/win: Let remaining chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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: chrome/browser/private_working_set_snapshot_win.cc
diff --git a/chrome/browser/private_working_set_snapshot_win.cc b/chrome/browser/private_working_set_snapshot_win.cc
index bd31dc71f985f15cb53a034082cafc352c14336a..0a0303ad2eec43abe5cc71af8db813035c507614 100644
--- a/chrome/browser/private_working_set_snapshot_win.cc
+++ b/chrome/browser/private_working_set_snapshot_win.cc
@@ -115,9 +115,9 @@ void PrivateWorkingSetSnapshot::Sample() {
DWORD buffer_size1 = 0;
DWORD item_count1 = 0;
// Process IDs should be retrieved as PDH_FMT_LONG
- if (PdhGetFormattedCounterArray(counter_pair.process_id_handle,
- PDH_FMT_LONG, &buffer_size1, &item_count1,
- nullptr) != PDH_MORE_DATA)
+ if (PdhGetFormattedCounterArray(
+ counter_pair.process_id_handle, PDH_FMT_LONG, &buffer_size1,
+ &item_count1, nullptr) != static_cast<PDH_STATUS>(PDH_MORE_DATA))
continue;
if (buffer_size1 == 0 || item_count1 == 0)
continue;
@@ -128,9 +128,9 @@ void PrivateWorkingSetSnapshot::Sample() {
// Note that if this second call to PdhGetFormattedCounterArray with the
// buffer size and count variables being zero is omitted then the PID and
// working-set results are not reliably correlated.
- if (PdhGetFormattedCounterArray(counter_pair.private_ws_handle,
- PDH_FMT_LARGE, &buffer_size2, &item_count2,
- nullptr) != PDH_MORE_DATA)
+ if (PdhGetFormattedCounterArray(
+ counter_pair.private_ws_handle, PDH_FMT_LARGE, &buffer_size2,
+ &item_count2, nullptr) != static_cast<PDH_STATUS>(PDH_MORE_DATA))
continue;
// It is not clear whether Pdh guarantees that the two counters in the same

Powered by Google App Engine
This is Rietveld 408576698