Add missing casts-to-int to int/uint16 comparisons.
These are required to avoid compilation errors due to signed/unsigned comparison, on some toolchains (specifically Clang/Fuchsia). Bug: chromium:839351 Change-Id: I52e726acd4e8d6744e98d7583bc82fcec81060d9 Reviewed-on: https://webrtc-review.googlesource.com/74100 Commit-Queue: Wez <wez@google.com> Reviewed-by: Tommi <tommi@webrtc.org> Reviewed-by: Henrik Boström <hbos@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23109}
This commit is contained in:
parent
2027b669b2
commit
939eb80ed0
@ -257,7 +257,7 @@ bool SetRtpSsrc(void* data, size_t len, uint32_t value) {
|
||||
// Assumes version 2, no padding, no extensions, no csrcs.
|
||||
bool SetRtpHeader(void* data, size_t len, const RtpHeader& header) {
|
||||
if (!IsValidRtpPayloadType(header.payload_type) ||
|
||||
header.seq_num < 0 || header.seq_num > UINT16_MAX) {
|
||||
header.seq_num < 0 || header.seq_num > static_cast<int>(UINT16_MAX)) {
|
||||
return false;
|
||||
}
|
||||
return (SetUint8(data, kRtpFlagsOffset, kRtpVersion << 6) &&
|
||||
|
||||
@ -2865,7 +2865,7 @@ bool PeerConnection::SetConfiguration(const RTCConfiguration& configuration,
|
||||
// Note that this isn't possible through chromium, since it's an unsigned
|
||||
// short in WebIDL.
|
||||
if (configuration.ice_candidate_pool_size < 0 ||
|
||||
configuration.ice_candidate_pool_size > UINT16_MAX) {
|
||||
configuration.ice_candidate_pool_size > static_cast<int>(UINT16_MAX)) {
|
||||
return SafeSetError(RTCErrorType::INVALID_RANGE, error);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user