Avoid implicit type truncations by inserting explicit casts or modifying prototypes to avoid needless up- and then down-casting.
BUG=chromium:82439 TEST=none R=henrik.lundin@webrtc.org, mflodman@webrtc.org, pthatcher@webrtc.org Review URL: https://webrtc-codereview.appspot.com/40569004 Cr-Commit-Position: refs/heads/master@{#8229} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8229 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -55,7 +55,7 @@ void RedPacket::CreateHeader(const uint8_t* rtp_header, size_t header_length,
|
||||
data_[1] += red_pl_type;
|
||||
// Add RED header
|
||||
// f-bit always 0
|
||||
data_[header_length] = pl_type;
|
||||
data_[header_length] = static_cast<uint8_t>(pl_type);
|
||||
header_length_ = header_length + kREDForFECHeaderLength;
|
||||
}
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ void VerifyHeader(uint16_t seq_num,
|
||||
uint32_t parsed_timestamp = (data[4] << 24) + (data[5] << 16) +
|
||||
(data[6] << 8) + data[7];
|
||||
EXPECT_EQ(timestamp, parsed_timestamp);
|
||||
EXPECT_EQ(fec_pltype, data[kRtpHeaderSize]);
|
||||
EXPECT_EQ(static_cast<uint8_t>(fec_pltype), data[kRtpHeaderSize]);
|
||||
}
|
||||
|
||||
class ProducerFecTest : public ::testing::Test {
|
||||
|
||||
Reference in New Issue
Block a user