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
This commit is contained in:
leozwang@webrtc.org
2012-05-30 16:46:09 +00:00
parent 0cb79cc851
commit e7e64e3468

View File

@@ -27,7 +27,7 @@ TEST(UdpSocketManager, CreateCallsInitAndDoesNotLeakMemory) {
WebRtc_UWord8 threads = 1; WebRtc_UWord8 threads = 1;
UdpSocketManager* mgr = UdpSocketManager::Create(id, threads); UdpSocketManager* mgr = UdpSocketManager::Create(id, threads);
// Create is supposed to have called init on the object. // 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."; << "Init should return false since Create is supposed to call it.";
UdpSocketManager::Return(); UdpSocketManager::Return();
} }
@@ -71,6 +71,9 @@ TEST(UdpSocketManager, UnremovedSocketsGetCollectedAtManagerDeletion) {
false, // ipV6Enable false, // ipV6Enable
false); // disableGQOS false); // disableGQOS
// The constructor will do AddSocket on the manager. // 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; unused_socket = NULL;
UdpSocketManager::Return(); UdpSocketManager::Return();
#endif #endif