Skip to content

Commit

Permalink
Revert "Enable and fix chromium clang warnings in rtp_rtcp test targets"
Browse files Browse the repository at this point in the history
This reverts commit 9486b11.

Reason for revert: Breaks downstream project

Original change's description:
> Enable and fix chromium clang warnings in rtp_rtcp test targets
> 
> Bug: webrtc:163
> Change-Id: I4ed3e63296d8bf06536a83196d597c7a906ba11c
> Reviewed-on: https://webrtc-review.googlesource.com/60802
> Reviewed-by: Björn Terelius <[email protected]>
> Reviewed-by: Patrik Höglund <[email protected]>
> Commit-Queue: Danil Chapovalov <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#22357}

[email protected],[email protected],[email protected]

Change-Id: I2c3777ea9f26813bdb395e7fd68f6b49443586ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:163
Reviewed-on: https://webrtc-review.googlesource.com/61060
Reviewed-by: Oleh Prypin <[email protected]>
Commit-Queue: Oleh Prypin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#22365}
  • Loading branch information
oprypin authored and Commit Bot committed Mar 9, 2018
1 parent d4bc01b commit 01aa210
Show file tree
Hide file tree
Showing 32 changed files with 52 additions and 184 deletions.
1 change: 0 additions & 1 deletion logging/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,6 @@ if (rtc_include_tests) {
rtc_source_set("mocks") {
testonly = true
sources = [
"rtc_event_log/mock/mock_rtc_event_log.cc",
"rtc_event_log/mock/mock_rtc_event_log.h",
]
deps = [
Expand Down
19 changes: 0 additions & 19 deletions logging/rtc_event_log/mock/mock_rtc_event_log.cc

This file was deleted.

3 changes: 0 additions & 3 deletions logging/rtc_event_log/mock/mock_rtc_event_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ namespace webrtc {

class MockRtcEventLog : public RtcEventLog {
public:
MockRtcEventLog();
~MockRtcEventLog();

virtual bool StartLogging(std::unique_ptr<RtcEventLogOutput> output,
int64_t output_period_ms) {
return StartLoggingProxy(output.get(), output_period_ms);
Expand Down
18 changes: 12 additions & 6 deletions modules/rtp_rtcp/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,15 @@ rtc_source_set("fec_test_helper") {

# TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}

rtc_source_set("mock_rtp_rtcp") {
testonly = true
sources = [
"mocks/mock_recovered_packet_receiver.cc",
"mocks/mock_rtcp_bandwidth_observer.cc",
"mocks/mock_rtcp_rtt_stats.cc",
"mocks/mock_rtp_rtcp.cc",
]
public = [
"mocks/mock_recovered_packet_receiver.h",
"mocks/mock_rtcp_bandwidth_observer.h",
"mocks/mock_rtcp_rtt_stats.h",
Expand Down Expand Up @@ -319,6 +317,10 @@ if (rtc_include_tests) {
"../../rtc_base:rtc_base_approved",
"../../test:test_support",
]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}

rtc_source_set("rtp_rtcp_unittests") {
Expand Down Expand Up @@ -420,5 +422,9 @@ if (rtc_include_tests) {

# TODO(jschuh): bugs.webrtc.org/1348: fix this warning.
configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
if (!build_with_chromium && is_clang) {
# Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
}
}
}
18 changes: 0 additions & 18 deletions modules/rtp_rtcp/mocks/mock_recovered_packet_receiver.cc

This file was deleted.

2 changes: 0 additions & 2 deletions modules/rtp_rtcp/mocks/mock_recovered_packet_receiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ namespace webrtc {

class MockRecoveredPacketReceiver : public RecoveredPacketReceiver {
public:
MockRecoveredPacketReceiver();
~MockRecoveredPacketReceiver();
MOCK_METHOD2(OnRecoveredPacket, void(const uint8_t* packet, size_t length));
};

Expand Down
18 changes: 0 additions & 18 deletions modules/rtp_rtcp/mocks/mock_rtcp_bandwidth_observer.cc

This file was deleted.

3 changes: 0 additions & 3 deletions modules/rtp_rtcp/mocks/mock_rtcp_bandwidth_observer.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ namespace webrtc {

class MockRtcpBandwidthObserver : public RtcpBandwidthObserver {
public:
MockRtcpBandwidthObserver();
~MockRtcpBandwidthObserver();

MOCK_METHOD1(OnReceivedEstimatedBitrate, void(uint32_t));
MOCK_METHOD3(OnReceivedRtcpReceiverReport,
void(const ReportBlockList&, int64_t, int64_t));
Expand Down
18 changes: 0 additions & 18 deletions modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.cc

This file was deleted.

3 changes: 0 additions & 3 deletions modules/rtp_rtcp/mocks/mock_rtcp_rtt_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ namespace webrtc {

class MockRtcpRttStats : public RtcpRttStats {
public:
MockRtcpRttStats();
~MockRtcpRttStats();

MOCK_METHOD1(OnRttUpdate, void(int64_t rtt));
MOCK_CONST_METHOD0(LastProcessedRtt, int64_t());
};
Expand Down
21 changes: 0 additions & 21 deletions modules/rtp_rtcp/mocks/mock_rtp_rtcp.cc

This file was deleted.

6 changes: 0 additions & 6 deletions modules/rtp_rtcp/mocks/mock_rtp_rtcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ namespace webrtc {

class MockRtpData : public RtpData {
public:
MockRtpData();
~MockRtpData();

MOCK_METHOD3(OnReceivedPayloadData,
int32_t(const uint8_t* payload_data,
size_t payload_size,
Expand All @@ -38,9 +35,6 @@ class MockRtpData : public RtpData {

class MockRtpRtcp : public RtpRtcp {
public:
MockRtpRtcp();
~MockRtpRtcp();

MOCK_METHOD1(RegisterDefaultModule, int32_t(RtpRtcp* module));
MOCK_METHOD0(DeRegisterDefaultModule, int32_t());
MOCK_METHOD0(DefaultModuleRegistered, bool());
Expand Down
4 changes: 2 additions & 2 deletions modules/rtp_rtcp/source/byte_io_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ namespace {

class ByteIoTest : public ::testing::Test {
protected:
ByteIoTest() = default;
~ByteIoTest() override = default;
ByteIoTest() {}
virtual ~ByteIoTest() {}

enum { kAlignments = sizeof(uint64_t) - 1 };

Expand Down
11 changes: 0 additions & 11 deletions modules/rtp_rtcp/source/fec_test_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,6 @@ constexpr uint8_t kVp8PayloadType = 120;
constexpr int kPacketTimestampIncrement = 3000;
} // namespace

MediaPacketGenerator::MediaPacketGenerator(uint32_t min_packet_size,
uint32_t max_packet_size,
uint32_t ssrc,
Random* random)
: min_packet_size_(min_packet_size),
max_packet_size_(max_packet_size),
ssrc_(ssrc),
random_(random) {}

MediaPacketGenerator::~MediaPacketGenerator() = default;

ForwardErrorCorrection::PacketList MediaPacketGenerator::ConstructMediaPackets(
int num_media_packets,
uint16_t start_seq_num) {
Expand Down
7 changes: 5 additions & 2 deletions modules/rtp_rtcp/source/fec_test_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,11 @@ class MediaPacketGenerator {
MediaPacketGenerator(uint32_t min_packet_size,
uint32_t max_packet_size,
uint32_t ssrc,
Random* random);
~MediaPacketGenerator();
Random* random)
: min_packet_size_(min_packet_size),
max_packet_size_(max_packet_size),
ssrc_(ssrc),
random_(random) {}

// Construct the media packets, up to |num_media_packets| packets.
ForwardErrorCorrection::PacketList ConstructMediaPackets(
Expand Down
8 changes: 4 additions & 4 deletions modules/rtp_rtcp/source/flexfec_receiver_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ TEST_F(FlexfecReceiverTest, ReceivesMultiplePackets) {
}

// Receive FEC packet.
auto* fec_packet = fec_packets.front();
auto fec_packet = fec_packets.front();
std::unique_ptr<Packet> packet_with_rtp_header =
packet_generator_.BuildFlexfecPacket(*fec_packet);
std::unique_ptr<ForwardErrorCorrection::ReceivedPacket> received_packet =
Expand Down Expand Up @@ -354,7 +354,7 @@ TEST_F(FlexfecReceiverTest, RecoversFrom50PercentLoss) {

// Receive all FEC packets.
media_it = media_packets.begin();
for (const auto* fec_packet : fec_packets) {
for (const auto& fec_packet : fec_packets) {
std::unique_ptr<Packet> fec_packet_with_rtp_header =
packet_generator_.BuildFlexfecPacket(*fec_packet);
++media_it;
Expand Down Expand Up @@ -453,7 +453,7 @@ TEST_F(FlexfecReceiverTest, SurvivesOldRecoveredPacketBeingReinserted) {
void SetReceiver(FlexfecReceiver* receiver) { receiver_ = receiver; }

// Implements RecoveredPacketReceiver.
void OnRecoveredPacket(const uint8_t* packet, size_t length) override {
void OnRecoveredPacket(const uint8_t* packet, size_t length) {
RtpPacketReceived parsed_packet;
EXPECT_TRUE(parsed_packet.Parse(packet, length));
parsed_packet.set_recovered(true);
Expand Down Expand Up @@ -567,7 +567,7 @@ TEST_F(FlexfecReceiverTest, RecoveryCallbackDoesNotLoopInfinitely) {
bool DeepRecursion() const { return deep_recursion_; }

// Implements RecoveredPacketReceiver.
void OnRecoveredPacket(const uint8_t* packet, size_t length) override {
void OnRecoveredPacket(const uint8_t* packet, size_t length) {
RtpPacketReceived parsed_packet;
EXPECT_TRUE(parsed_packet.Parse(packet, length));

Expand Down
2 changes: 1 addition & 1 deletion modules/rtp_rtcp/source/nack_rtx_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class RtpRtcpRtxNackTest : public ::testing::Test {
payload_data_length(sizeof(payload_data)),
fake_clock(123456),
retransmission_rate_limiter_(&fake_clock, kMaxRttMs) {}
~RtpRtcpRtxNackTest() override {}
~RtpRtcpRtxNackTest() {}

void SetUp() override {
RtpRtcp::Configuration configuration;
Expand Down
8 changes: 4 additions & 4 deletions modules/rtp_rtcp/source/receive_statistics_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ TEST_F(ReceiveStatisticsTest, RtcpCallbacks) {
public:
TestCallback()
: RtcpStatisticsCallback(), num_calls_(0), ssrc_(0), stats_() {}
~TestCallback() override {}
virtual ~TestCallback() {}

void StatisticsUpdated(const RtcpStatistics& statistics,
uint32_t ssrc) override {
Expand Down Expand Up @@ -283,10 +283,10 @@ class RtpTestCallback : public StreamDataCountersCallback {
public:
RtpTestCallback()
: StreamDataCountersCallback(), num_calls_(0), ssrc_(0), stats_() {}
~RtpTestCallback() override = default;
virtual ~RtpTestCallback() {}

void DataCountersUpdated(const StreamDataCounters& counters,
uint32_t ssrc) override {
virtual void DataCountersUpdated(const StreamDataCounters& counters,
uint32_t ssrc) {
ssrc_ = ssrc;
stats_ = counters;
++num_calls_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class RemoteNtpTimeEstimatorTest : public ::testing::Test {
: local_clock_(kLocalClockInitialTimeMs * 1000),
remote_clock_(kRemoteClockInitialTimeMs * 1000),
estimator_(new RemoteNtpTimeEstimator(&local_clock_)) {}
~RemoteNtpTimeEstimatorTest() override = default;
~RemoteNtpTimeEstimatorTest() {}

void AdvanceTimeMilliseconds(int64_t ms) {
local_clock_.AdvanceTimeMilliseconds(ms);
Expand Down
2 changes: 1 addition & 1 deletion modules/rtp_rtcp/source/rtcp_sender_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ TEST(NACKStringBuilderTest, TestCase13) {
class RtcpPacketTypeCounterObserverImpl : public RtcpPacketTypeCounterObserver {
public:
RtcpPacketTypeCounterObserverImpl() : ssrc_(0) {}
~RtcpPacketTypeCounterObserverImpl() override = default;
virtual ~RtcpPacketTypeCounterObserverImpl() {}
void RtcpPacketTypesCounterUpdated(
uint32_t ssrc,
const RtcpPacketTypeCounter& packet_counter) override {
Expand Down
2 changes: 1 addition & 1 deletion modules/rtp_rtcp/source/rtp_format_vp8_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void VerifyExtensions(RTPTypeHeader* type,
class RtpPacketizerVp8Test : public ::testing::Test {
protected:
RtpPacketizerVp8Test() : helper_(NULL) {}
void TearDown() override { delete helper_; }
virtual void TearDown() { delete helper_; }
bool Init(const size_t* partition_sizes, size_t num_partitions) {
hdr_info_.pictureId = kNoPictureId;
hdr_info_.nonReference = false;
Expand Down
8 changes: 6 additions & 2 deletions modules/rtp_rtcp/source/rtp_format_vp9_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ class RtpPacketizerVp9Test : public ::testing::Test {
static constexpr size_t kMaxPacketSize = 1200;

RtpPacketizerVp9Test() : packet_(kNoExtensions, kMaxPacketSize) {}
void SetUp() override { expected_.InitRTPVideoHeaderVP9(); }
virtual void SetUp() {
expected_.InitRTPVideoHeaderVP9();
}

RtpPacketToSend packet_;
std::unique_ptr<uint8_t[]> payload_;
Expand Down Expand Up @@ -582,7 +584,9 @@ class RtpDepacketizerVp9Test : public ::testing::Test {
RtpDepacketizerVp9Test()
: depacketizer_(new RtpDepacketizerVp9()) {}

void SetUp() override { expected_.InitRTPVideoHeaderVP9(); }
virtual void SetUp() {
expected_.InitRTPVideoHeaderVP9();
}

RTPVideoHeaderVP9 expected_;
std::unique_ptr<RtpDepacketizer> depacketizer_;
Expand Down
2 changes: 1 addition & 1 deletion modules/rtp_rtcp/source/rtp_receiver_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ TEST_F(RtpReceiverTest, GetSourcesRemoveOutdatedSource) {
header.arrOfCSRCs[0] = kCsrc1;
EXPECT_TRUE(rtp_receiver_->IncomingRtpPacket(
header, kTestPayload, sizeof(kTestPayload), payload_specific));
auto* rtp_receiver_impl = static_cast<RtpReceiverImpl*>(rtp_receiver_.get());
auto rtp_receiver_impl = static_cast<RtpReceiverImpl*>(rtp_receiver_.get());
auto ssrc_sources = rtp_receiver_impl->ssrc_sources_for_testing();
ASSERT_EQ(1u, ssrc_sources.size());
EXPECT_EQ(kSsrc1, ssrc_sources.begin()->source_id());
Expand Down
2 changes: 1 addition & 1 deletion modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const int64_t kMaxRttMs = 1000;
class RtcpRttStatsTestImpl : public RtcpRttStats {
public:
RtcpRttStatsTestImpl() : rtt_ms_(0) {}
~RtcpRttStatsTestImpl() override = default;
virtual ~RtcpRttStatsTestImpl() {}

void OnRttUpdate(int64_t rtt_ms) override { rtt_ms_ = rtt_ms; }
int64_t LastProcessedRtt() const override { return rtt_ms_; }
Expand Down
Loading

0 comments on commit 01aa210

Please sign in to comment.