diff --git a/webrtc/api/BUILD.gn b/webrtc/api/BUILD.gn index 10850d4081..b063513173 100644 --- a/webrtc/api/BUILD.gn +++ b/webrtc/api/BUILD.gn @@ -360,7 +360,6 @@ if (rtc_include_tests) { if (!is_win) { cflags = [ "-Wno-sign-compare" ] - cflags_cc = [ "-Wno-overloaded-virtual" ] } } diff --git a/webrtc/api/peerconnection_unittest.cc b/webrtc/api/peerconnection_unittest.cc index 422d37c255..3cfffe4631 100644 --- a/webrtc/api/peerconnection_unittest.cc +++ b/webrtc/api/peerconnection_unittest.cc @@ -188,6 +188,13 @@ class PeerConnectionTestClient : public webrtc::PeerConnectionObserver, public ObserverInterface, public rtc::MessageHandler { public: + // We need these using declarations because there are two versions of each of + // the below methods and we only override one of them. + // TODO(deadbeef): Remove once there's only one version of the methods. + using PeerConnectionObserver::OnAddStream; + using PeerConnectionObserver::OnRemoveStream; + using PeerConnectionObserver::OnDataChannel; + // If |config| is not provided, uses a default constructed RTCConfiguration. static PeerConnectionTestClient* CreateClientWithDtlsIdentityStore( const std::string& id, diff --git a/webrtc/api/peerconnectionfactory_unittest.cc b/webrtc/api/peerconnectionfactory_unittest.cc index 2d158e16af..9cd74ceb95 100644 --- a/webrtc/api/peerconnectionfactory_unittest.cc +++ b/webrtc/api/peerconnectionfactory_unittest.cc @@ -63,6 +63,13 @@ static const char kTurnIceServerWithIPv6Address[] = class NullPeerConnectionObserver : public PeerConnectionObserver { public: + // We need these using declarations because there are two versions of each of + // the below methods and we only override one of them. + // TODO(deadbeef): Remove once there's only one version of the methods. + using PeerConnectionObserver::OnAddStream; + using PeerConnectionObserver::OnRemoveStream; + using PeerConnectionObserver::OnDataChannel; + virtual ~NullPeerConnectionObserver() = default; virtual void OnMessage(const std::string& msg) {} virtual void OnSignalingMessage(const std::string& msg) {} diff --git a/webrtc/api/peerconnectioninterface_unittest.cc b/webrtc/api/peerconnectioninterface_unittest.cc index 3f84c3d75f..be4dc06acf 100644 --- a/webrtc/api/peerconnectioninterface_unittest.cc +++ b/webrtc/api/peerconnectioninterface_unittest.cc @@ -435,6 +435,13 @@ class MockTrackObserver : public ObserverInterface { class MockPeerConnectionObserver : public PeerConnectionObserver { public: + // We need these using declarations because there are two versions of each of + // the below methods and we only override one of them. + // TODO(deadbeef): Remove once there's only one version of the methods. + using PeerConnectionObserver::OnAddStream; + using PeerConnectionObserver::OnRemoveStream; + using PeerConnectionObserver::OnDataChannel; + MockPeerConnectionObserver() : remote_streams_(StreamCollection::Create()) {} virtual ~MockPeerConnectionObserver() { } diff --git a/webrtc/api/test/peerconnectiontestwrapper.h b/webrtc/api/test/peerconnectiontestwrapper.h index c56035de79..3cdac492f1 100644 --- a/webrtc/api/test/peerconnectiontestwrapper.h +++ b/webrtc/api/test/peerconnectiontestwrapper.h @@ -24,6 +24,13 @@ class PeerConnectionTestWrapper public webrtc::CreateSessionDescriptionObserver, public sigslot::has_slots<> { public: + // We need these using declarations because there are two versions of each of + // the below methods and we only override one of them. + // TODO(deadbeef): Remove once there's only one version of the methods. + using PeerConnectionObserver::OnAddStream; + using PeerConnectionObserver::OnRemoveStream; + using PeerConnectionObserver::OnDataChannel; + static void Connect(PeerConnectionTestWrapper* caller, PeerConnectionTestWrapper* callee); diff --git a/webrtc/media/BUILD.gn b/webrtc/media/BUILD.gn index 16fa090e53..db9a0d60dc 100644 --- a/webrtc/media/BUILD.gn +++ b/webrtc/media/BUILD.gn @@ -28,7 +28,6 @@ config("rtc_media_warnings_config") { # cannot be on the target directly. if (!is_win) { cflags = [ "-Wno-deprecated-declarations" ] - cflags_cc = [ "-Wno-overloaded-virtual" ] } } @@ -247,7 +246,6 @@ if (rtc_include_tests) { } if (!is_win) { cflags = [ "-Wno-sign-compare" ] - cflags_cc = [ "-Wno-overloaded-virtual" ] } } diff --git a/webrtc/media/media.gyp b/webrtc/media/media.gyp index 40c3bce168..65412ae657 100644 --- a/webrtc/media/media.gyp +++ b/webrtc/media/media.gyp @@ -94,9 +94,6 @@ 'cflags!': [ '-Wextra', ], - 'cflags_cc!': [ - '-Woverloaded-virtual', - ], 'msvs_disabled_warnings': [ 4245, # conversion from 'int' to 'size_t', signed/unsigned mismatch. 4267, # conversion from 'size_t' to 'int', possible loss of data.