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:
pkasting@chromium.org
2015-02-02 23:54:03 +00:00
parent 19f3f71c98
commit 0e81fdf5d2
10 changed files with 62 additions and 117 deletions

View File

@ -1129,12 +1129,12 @@ int NetEqImpl::Decode(PacketList* packet_list, Operations* operation,
AudioDecoder* decoder = NULL;
if (!packet_list->empty()) {
const Packet* packet = packet_list->front();
int payload_type = packet->header.payloadType;
uint8_t payload_type = packet->header.payloadType;
if (!decoder_database_->IsComfortNoise(payload_type)) {
decoder = decoder_database_->GetDecoder(payload_type);
assert(decoder);
if (!decoder) {
LOG_FERR1(LS_WARNING, GetDecoder, payload_type);
LOG_FERR1(LS_WARNING, GetDecoder, static_cast<int>(payload_type));
PacketBuffer::DeleteAllPackets(packet_list);
return kDecoderNotFound;
}
@ -1146,7 +1146,7 @@ int NetEqImpl::Decode(PacketList* packet_list, Operations* operation,
->GetDecoderInfo(payload_type);
assert(decoder_info);
if (!decoder_info) {
LOG_FERR1(LS_WARNING, GetDecoderInfo, payload_type);
LOG_FERR1(LS_WARNING, GetDecoderInfo, static_cast<int>(payload_type));
PacketBuffer::DeleteAllPackets(packet_list);
return kDecoderNotFound;
}