Fix "may be used uninitialized" warning.

TBR=marpan@webrtc.org
BUG=
TEST=build on Linux/Release and rtp_rtcp_unittests

Review URL: https://webrtc-codereview.appspot.com/381004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@1602 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
andrew@webrtc.org 2012-02-04 05:23:51 +00:00
parent b783a55df3
commit 4942832928

View File

@ -507,9 +507,9 @@ void RtpFecTest:: ReceivedPackets(
} }
} }
int RtpFecTest::ConstructMediaPackets(int num_media_packets) { int RtpFecTest::ConstructMediaPackets(int num_media_packets) {
ForwardErrorCorrection::Packet* media_packet; assert(num_media_packets > 0);
ForwardErrorCorrection::Packet* media_packet = NULL;
int sequence_number = rand(); int sequence_number = rand();
int time_stamp = rand(); int time_stamp = rand();
@ -555,6 +555,7 @@ int RtpFecTest::ConstructMediaPackets(int num_media_packets) {
sequence_number++; sequence_number++;
} }
// Last packet, set marker bit. // Last packet, set marker bit.
assert(media_packet != NULL);
media_packet->data[1] |= 0x80; media_packet->data[1] |= 0x80;
return sequence_number; return sequence_number;
} }