From c53d6b1e58ca3689265f3aafed95b65da38455b2 Mon Sep 17 00:00:00 2001 From: "ajm@google.com" Date: Tue, 12 Jul 2011 18:12:51 +0000 Subject: [PATCH] A few test changes which fix > 1000 warnings on Mac (perhaps other platforms as well...). Review URL: http://webrtc-codereview.appspot.com/65002 git-svn-id: http://webrtc.googlecode.com/svn/trunk@189 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../AutoTest/interface/vie_autotest_defines.h | 6 +++--- .../AutoTest/source/vie_autotest_rtp_rtcp.cc | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/video_engine/main/test/AutoTest/interface/vie_autotest_defines.h b/src/video_engine/main/test/AutoTest/interface/vie_autotest_defines.h index d1c36a99b..b7b101290 100644 --- a/src/video_engine/main/test/AutoTest/interface/vie_autotest_defines.h +++ b/src/video_engine/main/test/AutoTest/interface/vie_autotest_defines.h @@ -154,7 +154,7 @@ public: return 0; } - static void Log(char* fmt, ...) + static void Log(const char* fmt, ...) { va_list va; va_start(va, fmt); @@ -192,7 +192,7 @@ public: return 0; } - static int TestError(bool expr, char* fmt, ...) + static int TestError(bool expr, const char* fmt, ...) { if (!expr) @@ -251,7 +251,7 @@ void Sleep(unsigned long x) { namespace { -FILE* OpenTestFile(char* fileName) +FILE* OpenTestFile(const char* fileName) { char filePath[256]; sprintf(filePath,"%s%s",VIE_TEST_FILES_ROOT,fileName); diff --git a/src/video_engine/main/test/AutoTest/source/vie_autotest_rtp_rtcp.cc b/src/video_engine/main/test/AutoTest/source/vie_autotest_rtp_rtcp.cc index d76ff51c7..0a43238b6 100644 --- a/src/video_engine/main/test/AutoTest/source/vie_autotest_rtp_rtcp.cc +++ b/src/video_engine/main/test/AutoTest/source/vie_autotest_rtp_rtcp.cc @@ -161,7 +161,7 @@ int ViEAutoTest::ViERtpRtcpStandardTest() // RTCP CName // ViETest::Log("Testing CName\n\n"); - char* sendCName = "ViEAutoTestCName\0"; + const char* sendCName = "ViEAutoTestCName\0"; error = ViE.ptrViERtpRtcp->SetRTCPCName(tbChannel.videoChannel, sendCName); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -362,11 +362,11 @@ int ViEAutoTest::ViERtpRtcpStandardTest() ViETest::Log("Testing RTP dump...\n\n"); #ifdef ANDROID - char* inDumpName = "/sdcard/IncomingRTPDump.rtp"; - char* outDumpName = "/sdcard/OutgoingRTPDump.rtp"; + const char* inDumpName = "/sdcard/IncomingRTPDump.rtp"; + const char* outDumpName = "/sdcard/OutgoingRTPDump.rtp"; #else - char* inDumpName = "IncomingRTPDump.rtp"; - char* outDumpName = "OutgoingRTPDump.rtp"; + const char* inDumpName = "IncomingRTPDump.rtp"; + const char* outDumpName = "OutgoingRTPDump.rtp"; #endif error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, inDumpName, @@ -633,7 +633,7 @@ int ViEAutoTest::ViERtpRtcpAPITest() // CName is testedn in SimpleTest // Start sequence number is tested in SimplTEst // - char* testCName = "ViEAutotestCName"; + const char* testCName = "ViEAutotestCName"; error = ViE.ptrViERtpRtcp->SetRTCPCName(tbChannel.videoChannel, testCName); numberOfErrors += ViETest::TestError(error == 0, "ERROR: %s at line %d", __FUNCTION__, __LINE__); @@ -819,9 +819,9 @@ int ViEAutoTest::ViERtpRtcpAPITest() // { #ifdef ANDROID - char* dumpName = "/sdcard/DumpFileName.rtp"; + const char* dumpName = "/sdcard/DumpFileName.rtp"; #else - char* dumpName = "DumpFileName.rtp"; + const char* dumpName = "DumpFileName.rtp"; #endif error = ViE.ptrViERtpRtcp->StartRTPDump(tbChannel.videoChannel, dumpName, kRtpIncoming);