Remove warnings on Mac (Issue 178)

Remove an if-else that can never execute the else statement.
Remove double parenthesis.

BUG=http://code.google.com/p/webrtc/issues/detail?id=178
TEST=

Review URL: http://webrtc-codereview.appspot.com/318004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1146 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
henrik.lundin@webrtc.org 2011-12-09 13:58:17 +00:00
parent 5cc4dc9e0c
commit 6198624815
2 changed files with 10 additions and 19 deletions

View File

@ -116,17 +116,8 @@ int main(int argc, char* argv[])
std::pair<WebRtc_UWord16, WebRtc_UWord32>(newPacket->sequenceNumber(), newPacket->timeStamp());
WebRtc_UWord32 newSendTime = packetStats[tempPair];
if (newSendTime >= 0)
{
newPacket->setTime(newSendTime); // set new send time
packetVec.push_back(newPacket); // insert in vector
}
else
{
// negative value represents lost packet
// don't insert, but delete packet object
delete newPacket;
}
}

View File

@ -1410,7 +1410,7 @@ int NetEQTest_init_coders(enum WebRtcNetEQDecoder coder, int enc_frameSize, int
if (ok!=0) {
printf("Error: Couldn't allocate memory for iSAC SWB instance\n");
exit(0);
}if ((enc_frameSize==960)) {
}if (enc_frameSize==960) {
} else {
printf("\nError - iSAC SWB only supports frameSize 30 ms\n");
exit(0);
@ -1675,12 +1675,12 @@ int NetEQTest_encode(int coder, WebRtc_Word16 *indata, int frameLen, unsigned ch
for (int k = 0; k < numChannels; k++)
{
/* Encode with the selected coder type */
if ((coder==kDecoderPCMu)) { /*g711 u-law */
if (coder==kDecoderPCMu) { /*g711 u-law */
#ifdef CODEC_G711
cdlen = WebRtcG711_EncodeU(G711state[k], indata, frameLen, (WebRtc_Word16*) encoded);
#endif
}
else if ((coder==kDecoderPCMa)) { /*g711 A-law */
else if (coder==kDecoderPCMa) { /*g711 A-law */
#ifdef CODEC_G711
cdlen = WebRtcG711_EncodeA(G711state[k], indata, frameLen, (WebRtc_Word16*) encoded);
}
@ -1692,7 +1692,7 @@ int NetEQTest_encode(int coder, WebRtc_Word16 *indata, int frameLen, unsigned ch
}
#endif
#ifdef CODEC_G722
else if ((coder==kDecoderG722)) { /*g722 */
else if (coder==kDecoderG722) { /*g722 */
cdlen=WebRtcG722_Encode(g722EncState[k], indata, frameLen, (WebRtc_Word16*)encoded);
cdlen=frameLen>>1;
}
@ -1728,7 +1728,7 @@ int NetEQTest_encode(int coder, WebRtc_Word16 *indata, int frameLen, unsigned ch
}
#endif
#ifdef CODEC_G729
else if ((coder==kDecoderG729)) { /*g729 */
else if (coder==kDecoderG729) { /*g729 */
WebRtc_Word16 dataPos=0;
WebRtc_Word16 len=0;
cdlen = 0;
@ -1739,7 +1739,7 @@ int NetEQTest_encode(int coder, WebRtc_Word16 *indata, int frameLen, unsigned ch
}
#endif
#ifdef CODEC_G729_1
else if ((coder==kDecoderG729_1)) { /*g729.1 */
else if (coder==kDecoderG729_1) { /*g729.1 */
WebRtc_Word16 dataPos=0;
WebRtc_Word16 len=0;
cdlen = 0;
@ -1760,7 +1760,7 @@ int NetEQTest_encode(int coder, WebRtc_Word16 *indata, int frameLen, unsigned ch
}
#endif
#ifdef CODEC_ILBC
else if ((coder==kDecoderILBC)) { /*iLBC */
else if (coder==kDecoderILBC) { /*iLBC */
cdlen=WebRtcIlbcfix_Encode(iLBCenc_inst[k], indata,frameLen,(WebRtc_Word16*)encoded);
}
#endif
@ -1789,7 +1789,7 @@ int NetEQTest_encode(int coder, WebRtc_Word16 *indata, int frameLen, unsigned ch
}
#endif
#ifdef CODEC_GSMFR
else if ((coder==kDecoderGSMFR)) { /* GSM FR */
else if (coder==kDecoderGSMFR) { /* GSM FR */
cdlen=WebRtcGSMFR_Encode(GSMFRenc_inst[k], indata, frameLen, (WebRtc_Word16*)encoded);
}
#endif