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

Unified Diff: sandbox/win/src/threadpool_unittest.cc

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests 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
« no previous file with comments | « sandbox/win/src/sandbox_policy_base.cc ('k') | sandbox/win/src/win_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/threadpool_unittest.cc
diff --git a/sandbox/win/src/threadpool_unittest.cc b/sandbox/win/src/threadpool_unittest.cc
index f439810851fe27ef7ffa23bb955b5ffc2da941e2..4f3b0df5b1a5af1cc46be637620532fd7cde38ed 100644
--- a/sandbox/win/src/threadpool_unittest.cc
+++ b/sandbox/win/src/threadpool_unittest.cc
@@ -19,22 +19,22 @@ namespace sandbox {
TEST(IPCTest, ThreadPoolRegisterTest1) {
Win2kThreadPool thread_pool;
- EXPECT_EQ(0, thread_pool.OutstandingWaits());
+ EXPECT_EQ(0u, thread_pool.OutstandingWaits());
HANDLE event1 = ::CreateEventW(NULL, FALSE, FALSE, NULL);
HANDLE event2 = ::CreateEventW(NULL, FALSE, FALSE, NULL);
uint32 context = 0;
EXPECT_FALSE(thread_pool.RegisterWait(0, event1, EmptyCallBack, &context));
- EXPECT_EQ(0, thread_pool.OutstandingWaits());
+ EXPECT_EQ(0u, thread_pool.OutstandingWaits());
EXPECT_TRUE(thread_pool.RegisterWait(this, event1, EmptyCallBack, &context));
- EXPECT_EQ(1, thread_pool.OutstandingWaits());
+ EXPECT_EQ(1u, thread_pool.OutstandingWaits());
EXPECT_TRUE(thread_pool.RegisterWait(this, event2, EmptyCallBack, &context));
- EXPECT_EQ(2, thread_pool.OutstandingWaits());
+ EXPECT_EQ(2u, thread_pool.OutstandingWaits());
EXPECT_TRUE(thread_pool.UnRegisterWaits(this));
- EXPECT_EQ(0, thread_pool.OutstandingWaits());
+ EXPECT_EQ(0u, thread_pool.OutstandingWaits());
EXPECT_EQ(TRUE, ::CloseHandle(event1));
EXPECT_EQ(TRUE, ::CloseHandle(event2));
@@ -52,17 +52,17 @@ TEST(IPCTest, ThreadPoolRegisterTest2) {
uint32 c2 = 0;
EXPECT_TRUE(thread_pool.RegisterWait(&c1, event1, EmptyCallBack, &context));
- EXPECT_EQ(1, thread_pool.OutstandingWaits());
+ EXPECT_EQ(1u, thread_pool.OutstandingWaits());
EXPECT_TRUE(thread_pool.RegisterWait(&c2, event2, EmptyCallBack, &context));
- EXPECT_EQ(2, thread_pool.OutstandingWaits());
+ EXPECT_EQ(2u, thread_pool.OutstandingWaits());
EXPECT_TRUE(thread_pool.UnRegisterWaits(&c2));
- EXPECT_EQ(1, thread_pool.OutstandingWaits());
+ EXPECT_EQ(1u, thread_pool.OutstandingWaits());
EXPECT_TRUE(thread_pool.UnRegisterWaits(&c2));
- EXPECT_EQ(1, thread_pool.OutstandingWaits());
+ EXPECT_EQ(1u, thread_pool.OutstandingWaits());
EXPECT_TRUE(thread_pool.UnRegisterWaits(&c1));
- EXPECT_EQ(0, thread_pool.OutstandingWaits());
+ EXPECT_EQ(0u, thread_pool.OutstandingWaits());
EXPECT_EQ(TRUE, ::CloseHandle(event1));
EXPECT_EQ(TRUE, ::CloseHandle(event2));
@@ -83,9 +83,10 @@ TEST(IPCTest, ThreadPoolSignalAndWaitTest) {
EXPECT_EQ(WAIT_OBJECT_0, ::SignalObjectAndWait(event1, event2, 5000, FALSE));
EXPECT_TRUE(thread_pool.UnRegisterWaits(this));
- EXPECT_EQ(0, thread_pool.OutstandingWaits());
+ EXPECT_EQ(0u, thread_pool.OutstandingWaits());
- EXPECT_EQ(WAIT_TIMEOUT, ::SignalObjectAndWait(event1, event2, 1000, FALSE));
+ EXPECT_EQ(static_cast<DWORD>(WAIT_TIMEOUT),
+ ::SignalObjectAndWait(event1, event2, 1000, FALSE));
EXPECT_EQ(TRUE, ::CloseHandle(event1));
EXPECT_EQ(TRUE, ::CloseHandle(event2));
« no previous file with comments | « sandbox/win/src/sandbox_policy_base.cc ('k') | sandbox/win/src/win_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698