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}
This commit is contained in:
parent
ad6fc5a05c
commit
3fe372dbee
@ -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': [
|
||||
|
||||
@ -72,7 +72,6 @@
|
||||
'-Wextra',
|
||||
],
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
'-Woverloaded-virtual',
|
||||
],
|
||||
'msvs_disabled_warnings': [
|
||||
|
||||
@ -64,6 +64,7 @@ static const char kTurnIceServerWithIPv6Address[] =
|
||||
|
||||
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(
|
||||
|
||||
@ -416,7 +416,7 @@ class MockTrackObserver : public ObserverInterface {
|
||||
class MockPeerConnectionObserver : public PeerConnectionObserver {
|
||||
public:
|
||||
MockPeerConnectionObserver() : remote_streams_(StreamCollection::Create()) {}
|
||||
~MockPeerConnectionObserver() {
|
||||
virtual ~MockPeerConnectionObserver() {
|
||||
}
|
||||
void SetPeerConnectionInterface(PeerConnectionInterface* pc) {
|
||||
pc_ = pc;
|
||||
|
||||
@ -158,6 +158,8 @@ class MockIceObserver : public webrtc::IceObserver {
|
||||
ice_gathering_state_(PeerConnectionInterface::kIceGatheringNew) {
|
||||
}
|
||||
|
||||
virtual ~MockIceObserver() = default;
|
||||
|
||||
void OnIceConnectionChange(
|
||||
PeerConnectionInterface::IceConnectionState new_state) override {
|
||||
ice_connection_state_ = new_state;
|
||||
|
||||
@ -28,12 +28,6 @@ config("rtc_base_config") {
|
||||
"FEATURE_ENABLE_SSL",
|
||||
"LOGGING=1",
|
||||
]
|
||||
|
||||
if (is_posix) {
|
||||
# TODO(henrike): issue 3307, make rtc_base build without disabling
|
||||
# these flags.
|
||||
cflags_cc = [ "-Wno-non-virtual-dtor" ]
|
||||
}
|
||||
}
|
||||
|
||||
config("rtc_base_chromium_config") {
|
||||
@ -470,7 +464,6 @@ static_library("rtc_base") {
|
||||
configs += [ "//build/config/compiler:no_chromium_code" ]
|
||||
if (!is_win) {
|
||||
cflags += [ "-Wno-uninitialized" ]
|
||||
cflags_cc += [ "-Wno-non-virtual-dtor" ]
|
||||
}
|
||||
|
||||
if (rtc_build_ssl) {
|
||||
|
||||
@ -288,13 +288,7 @@
|
||||
'-Wextra',
|
||||
'-Wall',
|
||||
],
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
'defines': [
|
||||
'FEATURE_ENABLE_SSL',
|
||||
'SSL_USE_OPENSSL',
|
||||
|
||||
@ -19,9 +19,6 @@
|
||||
'defines': [
|
||||
'FEATURE_ENABLE_SSL',
|
||||
],
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
'sources': [
|
||||
'asyncsocket.h',
|
||||
'chatroommodule.h',
|
||||
@ -98,9 +95,6 @@
|
||||
'xmppthread.h',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
'defines': [
|
||||
'FEATURE_ENABLE_SSL',
|
||||
'FEATURE_ENABLE_VOICEMAIL',
|
||||
|
||||
@ -73,7 +73,7 @@ struct Codec {
|
||||
// Creates an empty codec.
|
||||
Codec();
|
||||
Codec(const Codec& c);
|
||||
~Codec();
|
||||
virtual ~Codec();
|
||||
|
||||
// Indicates if this codec is compatible with the specified codec.
|
||||
bool Matches(const Codec& codec) const;
|
||||
@ -120,7 +120,7 @@ struct AudioCodec : public Codec {
|
||||
// Creates an empty codec.
|
||||
AudioCodec();
|
||||
AudioCodec(const AudioCodec& c);
|
||||
~AudioCodec() = default;
|
||||
virtual ~AudioCodec() = default;
|
||||
|
||||
// Indicates if this codec is compatible with the specified codec.
|
||||
bool Matches(const AudioCodec& codec) const;
|
||||
@ -153,7 +153,7 @@ struct VideoCodec : public Codec {
|
||||
// Creates an empty codec.
|
||||
VideoCodec();
|
||||
VideoCodec(const VideoCodec& c);
|
||||
~VideoCodec() = default;
|
||||
virtual ~VideoCodec() = default;
|
||||
|
||||
std::string ToString() const;
|
||||
|
||||
@ -186,6 +186,7 @@ struct DataCodec : public Codec {
|
||||
DataCodec(int id, const std::string& name);
|
||||
DataCodec();
|
||||
DataCodec(const DataCodec& c);
|
||||
virtual ~DataCodec() = default;
|
||||
|
||||
DataCodec& operator=(const DataCodec& c);
|
||||
|
||||
|
||||
@ -841,6 +841,7 @@ struct RtpParameters {
|
||||
std::vector<RtpHeaderExtension> extensions;
|
||||
// TODO(pthatcher): Add streams.
|
||||
RtcpParameters rtcp;
|
||||
virtual ~RtpParameters() = default;
|
||||
};
|
||||
|
||||
// TODO(deadbeef): Rename to RtpSenderParameters, since they're intended to
|
||||
|
||||
@ -74,6 +74,7 @@ class UnsignalledSsrcHandler {
|
||||
};
|
||||
virtual Action OnUnsignalledSsrc(WebRtcVideoChannel2* channel,
|
||||
uint32_t ssrc) = 0;
|
||||
virtual ~UnsignalledSsrcHandler() = default;
|
||||
};
|
||||
|
||||
// TODO(pbos): Remove, use external handlers only.
|
||||
@ -86,6 +87,7 @@ class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler {
|
||||
rtc::VideoSinkInterface<VideoFrame>* GetDefaultSink() const;
|
||||
void SetDefaultSink(VideoMediaChannel* channel,
|
||||
rtc::VideoSinkInterface<VideoFrame>* sink);
|
||||
virtual ~DefaultUnsignalledSsrcHandler() = default;
|
||||
|
||||
private:
|
||||
uint32_t default_recv_ssrc_;
|
||||
@ -96,7 +98,7 @@ class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler {
|
||||
class WebRtcVideoEngine2 {
|
||||
public:
|
||||
WebRtcVideoEngine2();
|
||||
~WebRtcVideoEngine2();
|
||||
virtual ~WebRtcVideoEngine2();
|
||||
|
||||
// Basic video engine implementation.
|
||||
void Init();
|
||||
|
||||
@ -107,7 +107,6 @@
|
||||
'-Wextra',
|
||||
],
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
'-Woverloaded-virtual',
|
||||
],
|
||||
'msvs_disabled_warnings': [
|
||||
@ -248,11 +247,6 @@
|
||||
'engine/fakewebrtcvideoengine.h',
|
||||
'engine/fakewebrtcvoiceengine.h',
|
||||
],
|
||||
# TODO(kjellander): Make the code compile without disabling these flags.
|
||||
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
}, # target rtc_unittest_main
|
||||
{
|
||||
'target_name': 'rtc_media_unittests',
|
||||
@ -291,7 +285,6 @@
|
||||
'-Wno-sign-compare',
|
||||
],
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
'-Woverloaded-virtual',
|
||||
],
|
||||
'msvs_disabled_warnings': [
|
||||
|
||||
@ -144,6 +144,7 @@ class TurnAuthInterface {
|
||||
// Return true if the given username and realm are valid, or false if not.
|
||||
virtual bool GetKey(const std::string& username, const std::string& realm,
|
||||
std::string* key) = 0;
|
||||
virtual ~TurnAuthInterface() = default;
|
||||
};
|
||||
|
||||
// An interface enables Turn Server to control redirection behavior.
|
||||
|
||||
@ -16,9 +16,6 @@
|
||||
'<(webrtc_root)/base/base.gyp:rtc_base',
|
||||
'<(webrtc_root)/common.gyp:webrtc_common',
|
||||
],
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
'sources': [
|
||||
'base/asyncstuntcpsocket.cc',
|
||||
'base/asyncstuntcpsocket.h',
|
||||
@ -84,9 +81,6 @@
|
||||
'client/socketmonitor.h',
|
||||
],
|
||||
'direct_dependent_settings': {
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
'defines': [
|
||||
'FEATURE_ENABLE_VOICEMAIL',
|
||||
],
|
||||
@ -127,9 +121,6 @@
|
||||
'<(webrtc_root)/base/base.gyp:rtc_base',
|
||||
'<(webrtc_root)/common.gyp:webrtc_common',
|
||||
],
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
'sources': [
|
||||
'stunprober/stunprober.cc',
|
||||
],
|
||||
@ -141,9 +132,6 @@
|
||||
'libstunprober',
|
||||
'rtc_p2p'
|
||||
],
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
'sources': [
|
||||
'stunprober/main.cc',
|
||||
],
|
||||
|
||||
@ -33,11 +33,6 @@
|
||||
'defines': [
|
||||
'<@(rtc_pc_defines)',
|
||||
],
|
||||
# TODO(kjellander): Make the code compile without disabling these flags.
|
||||
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
'include_dirs': [
|
||||
'<(DEPTH)/testing/gtest/include',
|
||||
],
|
||||
@ -97,11 +92,6 @@
|
||||
'rtcpmuxfilter_unittest.cc',
|
||||
'srtpfilter_unittest.cc',
|
||||
],
|
||||
# TODO(kjellander): Make the code compile without disabling these flags.
|
||||
# See https://bugs.chromium.org/p/webrtc/issues/detail?id=3307
|
||||
'cflags_cc!': [
|
||||
'-Wnon-virtual-dtor',
|
||||
],
|
||||
'conditions': [
|
||||
['clang==0', {
|
||||
'cflags': [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user