From 3e4d54c6efb682aa8a82934e0866a7daf77b78b2 Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Thu, 9 Jun 2011 17:11:03 -0400 Subject: [PATCH] * #6089: fix warnings in make check --- sflphone-common/test/gaincontroltest.cpp | 2 ++ sflphone-common/test/sdptest.cpp | 22 +++++++++++----------- sflphone-common/test/siptest.cpp | 1 - 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/sflphone-common/test/gaincontroltest.cpp b/sflphone-common/test/gaincontroltest.cpp index ca44f39236..3a272470f6 100644 --- a/sflphone-common/test/gaincontroltest.cpp +++ b/sflphone-common/test/gaincontroltest.cpp @@ -37,8 +37,10 @@ using namespace std; void GainControlTest::testGainProcessing() { +#if 0 int fileSize; SFLDataFormat buf[SFL_GAIN_BUFFER_LENGTH]; +#endif // Sampling rate is 8000 // Target level is 0 dB diff --git a/sflphone-common/test/sdptest.cpp b/sflphone-common/test/sdptest.cpp index 9b5740a27a..d548e8a3a6 100644 --- a/sflphone-common/test/sdptest.cpp +++ b/sflphone-common/test/sdptest.cpp @@ -40,7 +40,7 @@ enum session_type LOCAL_OFFER, }; -static char *sdp_answer1 = "v=0\r\n" +static const char *sdp_answer1 = "v=0\r\n" "o=bob 2890844730 2890844730 IN IP4 host.example.com\r\n" "s= \r\n" "c=IN IP4 host.example.com\r\n" @@ -51,7 +51,7 @@ static char *sdp_answer1 = "v=0\r\n" "m=video 53002 RTP/AVP 32\r\n" "a=rtpmap:32 MPV/90000\r\n"; -static char *sdp_offer1 = "v=0\r\n" +static const char *sdp_offer1 = "v=0\r\n" "o=bob 2890844730 2890844730 IN IP4 host.example.com\r\n" "s= \r\n" "c=IN IP4 host.example.com\r\n" @@ -62,7 +62,7 @@ static char *sdp_offer1 = "v=0\r\n" "m=video 53002 RTP/AVP 32\r\n" "a=rtpmap:32 MPV/90000\r\n"; -static char *sdp_answer2 = "v=0\r\n" +static const char *sdp_answer2 = "v=0\r\n" "o=bob 2890844730 2890844730 IN IP4 host.example.com\r\n" "s= \r\n" "c=IN IP4 host.example.com\r\n" @@ -75,7 +75,7 @@ static char *sdp_answer2 = "v=0\r\n" "m=video 53002 RTP/AVP 32\r\n" "a=rtpmap:32 MPV/90000\r\n"; -static char *sdp_offer2 = "v=0\r\n" +static const char *sdp_offer2 = "v=0\r\n" "o=bob 2890844730 2890844730 IN IP4 host.example.com\r\n" "s= \r\n" "c=IN IP4 host.example.com\r\n" @@ -88,7 +88,7 @@ static char *sdp_offer2 = "v=0\r\n" "m=video 53002 RTP/AVP 32\r\n" "a=rtpmap:32 MPV/90000\r\n"; -static char *sdp_reinvite = "v=0\r\n" +static const char *sdp_reinvite = "v=0\r\n" "o=bob 2890844730 2890844730 IN IP4 host.example.com\r\n" "s= \r\n" "c=IN IP4 host.exampleReinvite.com\r\n" @@ -140,7 +140,7 @@ void SDPTest::testInitialOfferFirstCodec () _session->createOffer(codecSelection); // pjmedia_sdp_parse(_testPool, test[0].offer_answer[0].sdp2, strlen(test[0].offer_answer[0].sdp2), &remoteAnswer); - pjmedia_sdp_parse(_testPool, sdp_answer1, strlen(sdp_answer1), &remoteAnswer); + pjmedia_sdp_parse(_testPool, (char*)sdp_answer1, strlen(sdp_answer1), &remoteAnswer); _session->receivingAnswerAfterInitialOffer(remoteAnswer); @@ -172,7 +172,7 @@ void SDPTest::testInitialAnswerFirstCodec () codecSelection.push_back(PAYLOAD_CODEC_ALAW); codecSelection.push_back(PAYLOAD_CODEC_G722); - pjmedia_sdp_parse(_testPool, sdp_offer1, strlen(sdp_offer1), &remoteOffer); + pjmedia_sdp_parse(_testPool, (char*)sdp_offer1, strlen(sdp_offer1), &remoteOffer); _session->setLocalIP("127.0.0.1"); _session->setLocalPublishedAudioPort(49567); @@ -213,7 +213,7 @@ void SDPTest::testInitialOfferLastCodec () _session->createOffer(codecSelection); // pjmedia_sdp_parse(_testPool, test[0].offer_answer[0].sdp2, strlen(test[0].offer_answer[0].sdp2), &remoteAnswer); - pjmedia_sdp_parse(_testPool, sdp_answer2, strlen(sdp_answer2), &remoteAnswer); + pjmedia_sdp_parse(_testPool, (char*)sdp_answer2, strlen(sdp_answer2), &remoteAnswer); _session->receivingAnswerAfterInitialOffer(remoteAnswer); @@ -245,7 +245,7 @@ void SDPTest::testInitialAnswerLastCodec () codecSelection.push_back(PAYLOAD_CODEC_ALAW); codecSelection.push_back(PAYLOAD_CODEC_G722); - pjmedia_sdp_parse(_testPool, sdp_offer2, strlen(sdp_offer2), &remoteOffer); + pjmedia_sdp_parse(_testPool, (char*)sdp_offer2, strlen(sdp_offer2), &remoteOffer); _session->setLocalIP("127.0.0.1"); _session->setLocalPublishedAudioPort(49567); @@ -288,7 +288,7 @@ void SDPTest::testReinvite () _session->createOffer(codecSelection); // pjmedia_sdp_parse(_testPool, test[0].offer_answer[0].sdp2, strlen(test[0].offer_answer[0].sdp2), &remoteAnswer); - pjmedia_sdp_parse(_testPool, sdp_answer1, strlen(sdp_answer1), &remoteAnswer); + pjmedia_sdp_parse(_testPool, (char*)sdp_answer1, strlen(sdp_answer1), &remoteAnswer); _session->receivingAnswerAfterInitialOffer(remoteAnswer); @@ -302,7 +302,7 @@ void SDPTest::testReinvite () CPPUNIT_ASSERT(_session->getRemoteIP() == "host.example.com"); CPPUNIT_ASSERT(_session->getSessionMedia()->getMimeSubtype() == "PCMU"); - pjmedia_sdp_parse(_testPool, sdp_reinvite, strlen(sdp_reinvite), &reinviteOffer); + pjmedia_sdp_parse(_testPool, (char*)sdp_reinvite, strlen(sdp_reinvite), &reinviteOffer); _session->recieveOffer(reinviteOffer, codecSelection); diff --git a/sflphone-common/test/siptest.cpp b/sflphone-common/test/siptest.cpp index b764376c42..eeaffa5051 100644 --- a/sflphone-common/test/siptest.cpp +++ b/sflphone-common/test/siptest.cpp @@ -295,7 +295,6 @@ void SIPTest::testTwoIncomingIpCall () pthread_cond_init (&count_nb_thread, NULL); pthread_t firstCallThread, secondCallThread; - void *status; pthread_attr_t attr; -- GitLab