diff --git a/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc b/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc index a8e6e8d83cb..6d882987d4d 100644 --- a/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc +++ b/logging/rtc_event_log/encoder/rtc_event_log_encoder_unittest.cc @@ -417,7 +417,7 @@ TEST_P(RtcEventLogEncoderTest, RtcEventProbeResultFailure) { TEST_P(RtcEventLogEncoderTest, RtcEventProbeResultSuccess) { const int id = RandomPositiveInt(); - const int bitrate_bps = RandomBitrate(); + const uint64_t bitrate_bps = rtc::checked_cast(RandomBitrate()); auto event = rtc::MakeUnique(id, bitrate_bps); const int64_t timestamp_us = event->timestamp_us_; @@ -433,7 +433,6 @@ TEST_P(RtcEventLogEncoderTest, RtcEventProbeResultSuccess) { EXPECT_EQ(parsed_log_.GetTimestamp(0), timestamp_us); EXPECT_EQ(rtc::dchecked_cast(parsed_event.id), id); - ASSERT_TRUE(parsed_event.bitrate_bps); EXPECT_EQ(parsed_event.bitrate_bps, bitrate_bps); ASSERT_FALSE(parsed_event.failure_reason); } diff --git a/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc b/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc index c4379182630..574b6997ba3 100644 --- a/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc +++ b/modules/audio_coding/audio_network_adaptor/audio_network_adaptor_impl_unittest.cc @@ -314,12 +314,12 @@ TEST(AudioNetworkAdaptorImplTest, TestANAStats) { auto ana_stats = states.audio_network_adaptor->GetStats(); - EXPECT_EQ(ana_stats.bitrate_action_counter, 2); - EXPECT_EQ(ana_stats.channel_action_counter, 2); - EXPECT_EQ(ana_stats.dtx_action_counter, 2); - EXPECT_EQ(ana_stats.fec_action_counter, 2); - EXPECT_EQ(ana_stats.frame_length_increase_counter, 1); - EXPECT_EQ(ana_stats.frame_length_decrease_counter, 1); + EXPECT_EQ(ana_stats.bitrate_action_counter, 2u); + EXPECT_EQ(ana_stats.channel_action_counter, 2u); + EXPECT_EQ(ana_stats.dtx_action_counter, 2u); + EXPECT_EQ(ana_stats.fec_action_counter, 2u); + EXPECT_EQ(ana_stats.frame_length_increase_counter, 1u); + EXPECT_EQ(ana_stats.frame_length_decrease_counter, 1u); EXPECT_EQ(ana_stats.uplink_packet_loss_fraction, 0.1f); } diff --git a/modules/video_coding/video_codec_initializer.cc b/modules/video_coding/video_codec_initializer.cc index 5ba659d4b3f..e340b46b6f4 100644 --- a/modules/video_coding/video_codec_initializer.cc +++ b/modules/video_coding/video_codec_initializer.cc @@ -89,7 +89,7 @@ VideoCodec VideoCodecInitializer::VideoEncoderConfigToVideoCodec( break; case VideoEncoderConfig::ContentType::kScreen: video_codec.mode = kScreensharing; - if (!streams.empty() && streams[0].num_temporal_layers == 2) { + if (!streams.empty() && streams[0].num_temporal_layers == 2u) { video_codec.targetBitrate = streams[0].target_bitrate_bps / 1000; } break; diff --git a/rtc_base/string_to_number_unittest.cc b/rtc_base/string_to_number_unittest.cc index f5e5b573f1a..538ee1024bd 100644 --- a/rtc_base/string_to_number_unittest.cc +++ b/rtc_base/string_to_number_unittest.cc @@ -42,15 +42,16 @@ TYPED_TEST_P(BasicNumberTest, TestValidNumbers) { using T = TypeParam; constexpr T min_value = std::numeric_limits::lowest(); constexpr T max_value = std::numeric_limits::max(); + constexpr T zero_value = 0; const std::string min_string = std::to_string(min_value); const std::string max_string = std::to_string(max_value); EXPECT_EQ(min_value, StringToNumber(min_string)); EXPECT_EQ(min_value, StringToNumber(min_string.c_str())); EXPECT_EQ(max_value, StringToNumber(max_string)); EXPECT_EQ(max_value, StringToNumber(max_string.c_str())); - EXPECT_EQ(0, StringToNumber("0")); - EXPECT_EQ(0, StringToNumber("-0")); - EXPECT_EQ(0, StringToNumber(std::string("-0000000000000"))); + EXPECT_EQ(zero_value, StringToNumber("0")); + EXPECT_EQ(zero_value, StringToNumber("-0")); + EXPECT_EQ(zero_value, StringToNumber(std::string("-0000000000000"))); } TYPED_TEST_P(BasicNumberTest, TestInvalidNumbers) {