From 7ee1a44c27384650612290a18ccbe736e0e4b955 Mon Sep 17 00:00:00 2001 From: "thomasvl@google.com" Date: Fri, 23 Jul 2010 14:18:59 +0000 Subject: Up the warnings in ipc (take 2) - add chromium_code:1 to the GYP file - Fix some unittest compares of literal 0 to apis that return size_t - initializer order match declared order - type_id is a uint32, so fix up comparison warnings by using the right type in the test code. - duplicate a type cast used in the ipc headers into the ipc impl to make windows happy. - msvc warns about getenv, avoid it. BUG=none TEST=everything still builds/works Review URL: http://codereview.chromium.org/2821028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53468 0039d316-1c4b-4281-b951-d872f2087c98 --- ipc/ipc_fuzzing_tests.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ipc/ipc_fuzzing_tests.cc') diff --git a/ipc/ipc_fuzzing_tests.cc b/ipc/ipc_fuzzing_tests.cc index 37451f4b..f94e170 100644 --- a/ipc/ipc_fuzzing_tests.cc +++ b/ipc/ipc_fuzzing_tests.cc @@ -185,7 +185,7 @@ class FuzzerServerListener : public SimpleListener { Cleanup(); } - bool RoundtripAckReply(int routing, int type_id, int reply) { + bool RoundtripAckReply(int routing, uint32 type_id, int reply) { IPC::Message* message = new IPC::Message(routing, type_id, IPC::Message::PRIORITY_NORMAL); message->WriteInt(reply + 1); @@ -200,7 +200,7 @@ class FuzzerServerListener : public SimpleListener { MessageLoop::current()->Quit(); } - void ReplyMsgNotHandled(int type_id) { + void ReplyMsgNotHandled(uint32 type_id) { RoundtripAckReply(FUZZER_ROUTING_ID, CLIENT_UNHANDLED_IPC, type_id); Cleanup(); } @@ -226,7 +226,7 @@ class FuzzerClientListener : public SimpleListener { MessageLoop::current()->Quit(); } - bool ExpectMessage(int value, int type_id) { + bool ExpectMessage(int value, uint32 type_id) { if (!MsgHandlerInternal(type_id)) return false; int msg_value1 = 0; @@ -246,12 +246,12 @@ class FuzzerClientListener : public SimpleListener { return true; } - bool ExpectMsgNotHandled(int type_id) { + bool ExpectMsgNotHandled(uint32 type_id) { return ExpectMessage(type_id, CLIENT_UNHANDLED_IPC); } private: - bool MsgHandlerInternal(int type_id) { + bool MsgHandlerInternal(uint32 type_id) { MessageLoop::current()->Run(); if (NULL == last_msg_) return false; -- cgit v1.1