Fix all -Wnon-virtual-dtor warnings.
This is needed to get the GN build going for several parts
of the code tree.
BUG=webrtc:3307
NOTRY=True
R=henrika@webrtc.org, nisse@webrtc.org
Review URL: https://codereview.webrtc.org/1928653005 .
Cr-Commit-Position: refs/heads/master@{#12693}
diff --git a/webrtc/api/api.gyp b/webrtc/api/api.gyp
index e705831..377ef8f 100644
--- a/webrtc/api/api.gyp
+++ b/webrtc/api/api.gyp
@@ -66,7 +66,6 @@
'-Wextra',
],
'cflags_cc!': [
- '-Wnon-virtual-dtor',
'-Woverloaded-virtual',
],
'msvs_disabled_warnings': [
@@ -207,7 +206,6 @@
'-Wno-sign-compare',
],
'cflags_cc!': [
- '-Wnon-virtual-dtor',
'-Woverloaded-virtual',
],
'conditions': [
diff --git a/webrtc/api/api_tests.gyp b/webrtc/api/api_tests.gyp
index 4434420..65bb461 100644
--- a/webrtc/api/api_tests.gyp
+++ b/webrtc/api/api_tests.gyp
@@ -72,7 +72,6 @@
'-Wextra',
],
'cflags_cc!': [
- '-Wnon-virtual-dtor',
'-Woverloaded-virtual',
],
'msvs_disabled_warnings': [
diff --git a/webrtc/api/peerconnectionfactory_unittest.cc b/webrtc/api/peerconnectionfactory_unittest.cc
index e7859d0..833242a 100644
--- a/webrtc/api/peerconnectionfactory_unittest.cc
+++ b/webrtc/api/peerconnectionfactory_unittest.cc
@@ -64,6 +64,7 @@
class NullPeerConnectionObserver : public PeerConnectionObserver {
public:
+ virtual ~NullPeerConnectionObserver() = default;
virtual void OnMessage(const std::string& msg) {}
virtual void OnSignalingMessage(const std::string& msg) {}
virtual void OnSignalingChange(
diff --git a/webrtc/api/peerconnectioninterface_unittest.cc b/webrtc/api/peerconnectioninterface_unittest.cc
index 2594b6c..1386e8c 100644
--- a/webrtc/api/peerconnectioninterface_unittest.cc
+++ b/webrtc/api/peerconnectioninterface_unittest.cc
@@ -416,7 +416,7 @@
class MockPeerConnectionObserver : public PeerConnectionObserver {
public:
MockPeerConnectionObserver() : remote_streams_(StreamCollection::Create()) {}
- ~MockPeerConnectionObserver() {
+ virtual ~MockPeerConnectionObserver() {
}
void SetPeerConnectionInterface(PeerConnectionInterface* pc) {
pc_ = pc;
diff --git a/webrtc/api/webrtcsession_unittest.cc b/webrtc/api/webrtcsession_unittest.cc
index 87481a8..45ffc36 100644
--- a/webrtc/api/webrtcsession_unittest.cc
+++ b/webrtc/api/webrtcsession_unittest.cc
@@ -158,6 +158,8 @@
ice_gathering_state_(PeerConnectionInterface::kIceGatheringNew) {
}
+ virtual ~MockIceObserver() = default;
+
void OnIceConnectionChange(
PeerConnectionInterface::IceConnectionState new_state) override {
ice_connection_state_ = new_state;