Remove tautological 'unsigned expr < 0' comparisons
This is the result of compiling Chromium with Wtautological-unsigned-zero-compare. For more details, see: https://chromium-review.googlesource.com/c/chromium/src/+/2802412 Change-Id: I05cec6ae5738036a56beadeaa1dde5189edf0137 Bug: chromium:1195670 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/213783 Reviewed-by: Stefan Holmer <stefan@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Commit-Queue: Stefan Holmer <stefan@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33689}
This commit is contained in:
parent
22379fc8dc
commit
a3575cb848
@ -38,7 +38,7 @@ operator=(const AudioEncoderMultiChannelOpusConfig&) = default;
|
||||
bool AudioEncoderMultiChannelOpusConfig::IsOk() const {
|
||||
if (frame_size_ms <= 0 || frame_size_ms % 10 != 0)
|
||||
return false;
|
||||
if (num_channels < 0 || num_channels >= 255) {
|
||||
if (num_channels >= 255) {
|
||||
return false;
|
||||
}
|
||||
if (bitrate_bps < kMinBitrateBps || bitrate_bps > kMaxBitrateBps)
|
||||
@ -47,7 +47,7 @@ bool AudioEncoderMultiChannelOpusConfig::IsOk() const {
|
||||
return false;
|
||||
|
||||
// Check the lengths:
|
||||
if (num_channels < 0 || num_streams < 0 || coupled_streams < 0) {
|
||||
if (num_streams < 0 || coupled_streams < 0) {
|
||||
return false;
|
||||
}
|
||||
if (num_streams < coupled_streams) {
|
||||
|
||||
@ -61,7 +61,7 @@ bool AudioEncoderOpusConfig::IsOk() const {
|
||||
// well; we can add support for them when needed.)
|
||||
return false;
|
||||
}
|
||||
if (num_channels < 0 || num_channels >= 255) {
|
||||
if (num_channels >= 255) {
|
||||
return false;
|
||||
}
|
||||
if (!bitrate_bps)
|
||||
|
||||
@ -134,7 +134,7 @@ void RtpPacketHistory::PutRtpPacket(std::unique_ptr<RtpPacketToSend> packet,
|
||||
// Store packet.
|
||||
const uint16_t rtp_seq_no = packet->SequenceNumber();
|
||||
int packet_index = GetPacketIndex(rtp_seq_no);
|
||||
if (packet_index >= 0u &&
|
||||
if (packet_index >= 0 &&
|
||||
static_cast<size_t>(packet_index) < packet_history_.size() &&
|
||||
packet_history_[packet_index].packet_ != nullptr) {
|
||||
RTC_LOG(LS_WARNING) << "Duplicate packet inserted: " << rtp_seq_no;
|
||||
|
||||
@ -110,8 +110,7 @@ bool AllocationIsValid(const VideoLayersAllocation& allocation) {
|
||||
if (spatial_layer.height <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (spatial_layer.frame_rate_fps < 0 ||
|
||||
spatial_layer.frame_rate_fps > 255) {
|
||||
if (spatial_layer.frame_rate_fps > 255) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user