From e7e64e34682b1df542923f9469c21222577de4c8 Mon Sep 17 00:00:00 2001 From: "leozwang@webrtc.org" Date: Wed, 30 May 2012 16:46:09 +0000 Subject: [PATCH] Fix compilation errors on ChromeOS Description: This cl fixes two compilation errors on ChromeOS/ARM, it could also be reproduced by gcc 4.5+. I also add comments about error message and how I solve them. BUG=webrtc issue 554 TEST=try bots and build on chromeos arm Review URL: https://webrtc-codereview.appspot.com/611006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2327 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../udp_transport/source/udp_socket_manager_unittest.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/udp_transport/source/udp_socket_manager_unittest.cc b/src/modules/udp_transport/source/udp_socket_manager_unittest.cc index 21c1a4e53..891a47a7e 100644 --- a/src/modules/udp_transport/source/udp_socket_manager_unittest.cc +++ b/src/modules/udp_transport/source/udp_socket_manager_unittest.cc @@ -27,7 +27,7 @@ TEST(UdpSocketManager, CreateCallsInitAndDoesNotLeakMemory) { WebRtc_UWord8 threads = 1; UdpSocketManager* mgr = UdpSocketManager::Create(id, threads); // Create is supposed to have called init on the object. - EXPECT_EQ(false, mgr->Init(id, threads)) + EXPECT_FALSE(mgr->Init(id, threads)) << "Init should return false since Create is supposed to call it."; UdpSocketManager::Return(); } @@ -71,6 +71,9 @@ TEST(UdpSocketManager, UnremovedSocketsGetCollectedAtManagerDeletion) { false, // ipV6Enable false); // disableGQOS // The constructor will do AddSocket on the manager. + // Call a member funtion to work around "set but not used" compliation + // error on ChromeOS ARM. + unused_socket->SetEventToNull(); unused_socket = NULL; UdpSocketManager::Return(); #endif