diff --git a/src/modules/audio_coding/neteq/test/NetEqRTPplay.cc b/src/modules/audio_coding/neteq/test/NetEqRTPplay.cc index 1d6d80d5b7..339dffbbb4 100644 --- a/src/modules/audio_coding/neteq/test/NetEqRTPplay.cc +++ b/src/modules/audio_coding/neteq/test/NetEqRTPplay.cc @@ -644,7 +644,7 @@ int main(int argc, char* argv[]) if (stereoMode > stereoModeMono) { // stereo - WebRtc_Word16 tempLen; + WebRtc_Word16 tempLen; tempLen = NetEQvector[0]->recOut( out_data, msInfo ); // master outLen = NetEQvector[1]->recOut( &out_data[tempLen], msInfo ); // slave @@ -715,8 +715,9 @@ int main(int argc, char* argv[]) // } free(msInfo); - for (std::vector::iterator it = NetEQvector.begin(); - it < NetEQvector.end(); delete *it++); + for (std::vector::iterator it = NetEQvector.begin(); + it < NetEQvector.end(); delete *it++) { + } printf("\nSimulation done!\n"); @@ -885,7 +886,7 @@ void parsePtypeFile(FILE *ptypeFile, std::map* dec bool isStereo = false; if (codec[L-1] == '*') { - // stereo codec + // stereo codec isStereo = true; // remove '*' @@ -1187,7 +1188,7 @@ void parsePtypeFile(FILE *ptypeFile, std::map* dec else if(isStereo) { switch(tempDecoder.codec) { - // sample based codecs + // sample based codecs case kDecoderPCMu: case kDecoderPCMa: case kDecoderG722: @@ -1592,7 +1593,7 @@ int doAPItest() { printf("NetEq version: %s\n\n", version); /* test that API functions return -1 if instance is NULL */ -#define CHECK_MINUS_ONE(x) {int errCode = x; if((errCode)!=-1){printf("\n API test failed at line %d: %s. Function did not return -1 as expected\n",__LINE__,#x); return(-1);}} +#define CHECK_MINUS_ONE(x) {int errCode = x; if((errCode)!=-1){printf("\n API test failed at line %d: %s. Function did not return -1 as expected\n",__LINE__,#x); return(-1);}} //#define RESET_ERROR(x) ((MainInst_t*) x)->ErrorCode = 0; inst = NULL; diff --git a/src/modules/video_coding/main/test/video_rtp_play.cc b/src/modules/video_coding/main/test/video_rtp_play.cc index fd58a3bcbf..d07711b8c2 100644 --- a/src/modules/video_coding/main/test/video_rtp_play.cc +++ b/src/modules/video_coding/main/test/video_rtp_play.cc @@ -164,7 +164,8 @@ int RtpPlay(CmdArgs& args) return -1; } } - while (vcm->DecodeDualFrame(0) == 1); + while (vcm->DecodeDualFrame(0) == 1) { + } if (vcm->TimeUntilNextProcess() <= 0) { vcm->Process(); diff --git a/src/modules/video_coding/main/test/video_rtp_play_mt.cc b/src/modules/video_coding/main/test/video_rtp_play_mt.cc index 21b9f737bb..ecb7ab6340 100644 --- a/src/modules/video_coding/main/test/video_rtp_play_mt.cc +++ b/src/modules/video_coding/main/test/video_rtp_play_mt.cc @@ -53,7 +53,8 @@ bool DecodeThread(void* obj) { SharedState* state = static_cast(obj); state->_vcm.Decode(10000); - while (state->_vcm.DecodeDualFrame(0) == 1); + while (state->_vcm.DecodeDualFrame(0) == 1) { + } return true; } diff --git a/src/test/testsupport/packet_reader_unittest.cc b/src/test/testsupport/packet_reader_unittest.cc index 6719e4c803..9c7fc3b13b 100644 --- a/src/test/testsupport/packet_reader_unittest.cc +++ b/src/test/testsupport/packet_reader_unittest.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source @@ -111,12 +111,13 @@ TEST_F(PacketReaderTest, NormalLargeData) { // Test with empty data. TEST_F(PacketReaderTest, EmptyData) { const int kDataLengthInBytes = 0; - WebRtc_UWord8* data = new WebRtc_UWord8[kDataLengthInBytes]; + // But don't really try to allocate a zero-length array... + WebRtc_UWord8 data[kPacketSizeInBytes]; + WebRtc_UWord8* data_pointer = data; reader_->InitializeReading(data, kDataLengthInBytes, kPacketSizeInBytes); - EXPECT_EQ(kDataLengthInBytes, reader_->NextPacket(&data)); + EXPECT_EQ(kDataLengthInBytes, reader_->NextPacket(&data_pointer)); // Do it again to make sure nothing changes - EXPECT_EQ(kDataLengthInBytes, reader_->NextPacket(&data)); - delete[] data; + EXPECT_EQ(kDataLengthInBytes, reader_->NextPacket(&data_pointer)); } } // namespace test diff --git a/tools/e2e_quality/audio/audio_e2e_harness.cc b/tools/e2e_quality/audio/audio_e2e_harness.cc index fe63286758..80a1341bc9 100644 --- a/tools/e2e_quality/audio/audio_e2e_harness.cc +++ b/tools/e2e_quality/audio/audio_e2e_harness.cc @@ -86,7 +86,8 @@ void RunHarness() { ASSERT_EQ(0, base->StartSend(channel)); // Run forever... - while (1); + while (1) { + } } } // namespace