From ee8b8611904ec0eaf600acba8561750a9e45cb85 Mon Sep 17 00:00:00 2001 From: kthelgason Date: Fri, 31 Mar 2017 04:50:27 -0700 Subject: [PATCH] remove module-wide warning suppression. The warnings in question are benign and should be supressed locally so we can keep the analysis for the rest of the files. BUG=webrtc:5748 Review-Url: https://codereview.webrtc.org/2790883002 Cr-Commit-Position: refs/heads/master@{#17485} --- webrtc/modules/audio_device/BUILD.gn | 8 -------- webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm | 5 +++++ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/webrtc/modules/audio_device/BUILD.gn b/webrtc/modules/audio_device/BUILD.gn index 9c776d3891..f9b7f8b623 100644 --- a/webrtc/modules/audio_device/BUILD.gn +++ b/webrtc/modules/audio_device/BUILD.gn @@ -19,14 +19,6 @@ config("audio_device_config") { "include", "dummy", # Contains dummy audio device implementations. ] - if (is_ios) { - # GN orders flags on a target before flags from configs. In order to be able - # suppress the -Wthread-safety-analysis warning, it has come from a config - # and can't be on the target directly. - # TODO(tkchin): Remove after fixing - # https://bugs.chromium.org/p/webrtc/issues/detail?id=5748 - cflags = [ "-Wno-thread-safety-analysis" ] - } } config("audio_device_warnings_config") { diff --git a/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm b/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm index 1d099397f3..4ce24e7c3f 100644 --- a/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm +++ b/webrtc/modules/audio_device/ios/objc/RTCAudioSession.mm @@ -193,6 +193,9 @@ NSInteger const kRTCAudioSessionErrorConfiguration = -2; } } +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wthread-safety-analysis" + - (void)lockForConfiguration { _crit.Enter(); rtc::AtomicOps::Increment(&_lockRecursionCount); @@ -210,6 +213,8 @@ NSInteger const kRTCAudioSessionErrorConfiguration = -2; } } +#pragma clang diagnostic pop + #pragma mark - AVAudioSession proxy methods - (NSString *)category {