cast return values in uint16_t RTPFile::Read() to uint16_t to avoid compile error
BUG=3663 TESTED=ninja local build on windows. R=andrew@webrtc.org, kwiberg@webrtc.org, thorcarpenter@google.com Review URL: https://webrtc-codereview.appspot.com/16229004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7049 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -231,13 +231,13 @@ uint16_t RTPFile::Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData,
|
|||||||
EXPECT_EQ(lengthBytes, plen + 8);
|
EXPECT_EQ(lengthBytes, plen + 8);
|
||||||
|
|
||||||
if (plen == 0) {
|
if (plen == 0) {
|
||||||
return 0;
|
return static_cast<uint16_t>(0);
|
||||||
}
|
}
|
||||||
if (payloadSize < (lengthBytes - 20)) {
|
if (payloadSize < (lengthBytes - 20)) {
|
||||||
return 0;
|
return static_cast<uint16_t>(0);
|
||||||
}
|
}
|
||||||
if (lengthBytes < 20) {
|
if (lengthBytes < 20) {
|
||||||
return 0;
|
return static_cast<uint16_t>(0);
|
||||||
}
|
}
|
||||||
lengthBytes -= 20;
|
lengthBytes -= 20;
|
||||||
EXPECT_EQ(lengthBytes, fread(payloadData, 1, lengthBytes, _rtpFile));
|
EXPECT_EQ(lengthBytes, fread(payloadData, 1, lengthBytes, _rtpFile));
|
||||||
|
Reference in New Issue
Block a user