tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 730ae0be49a52867cb784b859b27b465cfb53bc0
parent a958b79ad5f1e8fd9aff5a5303784865447a7b3a
Author: Dan Baker <dbaker@mozilla.com>
Date:   Wed,  3 Dec 2025 10:19:31 -0700

Bug 2000941 - (fix-5efb280e2b) fix build issue by adding check for clang before utilizing #pragma clang

Diffstat:
Mthird_party/libwebrtc/api/audio/audio_processing_statistics.cc | 4++++
Mthird_party/libwebrtc/api/audio/audio_processing_statistics.h | 4++++
Mthird_party/libwebrtc/api/data_channel_interface.h | 4++++
Mthird_party/libwebrtc/modules/audio_processing/include/audio_frame_proxies.cc | 6++++++
Mthird_party/libwebrtc/pc/dtmf_sender.cc | 8++++++++
Mthird_party/libwebrtc/pc/sctp_data_channel.cc | 4++++
6 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/third_party/libwebrtc/api/audio/audio_processing_statistics.cc b/third_party/libwebrtc/api/audio/audio_processing_statistics.cc @@ -16,11 +16,15 @@ AudioProcessingStats::AudioProcessingStats() = default; // TODO: https://issues.webrtc.org/42221314 - remove pragma when deprecated // field `voice_detected` is removed. +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif AudioProcessingStats::AudioProcessingStats(const AudioProcessingStats& other) = default; +#if defined(__clang__) #pragma clang diagnostic pop +#endif AudioProcessingStats::~AudioProcessingStats() = default; diff --git a/third_party/libwebrtc/api/audio/audio_processing_statistics.h b/third_party/libwebrtc/api/audio/audio_processing_statistics.h @@ -20,8 +20,10 @@ namespace webrtc { // This version of the stats uses Optionals, it will replace the regular // AudioProcessingStatistics struct. +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif struct RTC_EXPORT AudioProcessingStats { AudioProcessingStats(); AudioProcessingStats(const AudioProcessingStats& other); @@ -64,7 +66,9 @@ struct RTC_EXPORT AudioProcessingStats { // call to `GetStatistics()`. std::optional<int32_t> delay_ms; }; +#if defined(__clang__) #pragma clang diagnostic pop +#endif } // namespace webrtc diff --git a/third_party/libwebrtc/api/data_channel_interface.h b/third_party/libwebrtc/api/data_channel_interface.h @@ -32,8 +32,10 @@ namespace webrtc { // C++ version of: https://www.w3.org/TR/webrtc/#idl-def-rtcdatachannelinit // TODO(deadbeef): Use std::optional for the "-1 if unset" things. +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif struct DataChannelInit { // Deprecated. Reliability is assumed, and channel will be unreliable if // maxRetransmitTime or MaxRetransmits is set. @@ -71,7 +73,9 @@ struct DataChannelInit { // https://w3c.github.io/webrtc-priority/#new-rtcdatachannelinit-member std::optional<PriorityValue> priority; }; +#if defined(__clang__) #pragma clang diagnostic pop +#endif // At the JavaScript level, data can be passed in as a string or a blob, so // this structure's `binary` flag tells whether the data should be interpreted diff --git a/third_party/libwebrtc/modules/audio_processing/include/audio_frame_proxies.cc b/third_party/libwebrtc/modules/audio_processing/include/audio_frame_proxies.cc @@ -32,14 +32,20 @@ int ProcessAudioFrame(AudioProcessing* ap, AudioFrame* frame) { AudioProcessingStats stats = ap->GetStatistics(); // TODO: https://issues.webrtc.org/42221314 - remove when deleted + +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif if (stats.voice_detected) { frame->vad_activity_ = *stats.voice_detected ? AudioFrame::VADActivity::kVadActive : AudioFrame::VADActivity::kVadPassive; } + +#if defined(__clang__) #pragma clang diagnostic pop +#endif return result; } diff --git a/third_party/libwebrtc/pc/dtmf_sender.cc b/third_party/libwebrtc/pc/dtmf_sender.cc @@ -191,10 +191,14 @@ void DtmfSender::DoInsertDtmf() { // Fire a “OnToneChange” event with an empty string and stop. if (observer_) { observer_->OnToneChange(std::string(), tones_); +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif observer_->OnToneChange(std::string()); +#if defined(__clang__) #pragma clang diagnostic pop +#endif } return; } else { @@ -232,10 +236,14 @@ void DtmfSender::DoInsertDtmf() { if (observer_) { observer_->OnToneChange(tones_.substr(first_tone_pos, 1), tones_.substr(first_tone_pos + 1)); +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif observer_->OnToneChange(tones_.substr(first_tone_pos, 1)); +#if defined(__clang__) #pragma clang diagnostic pop +#endif } // Erase the unrecognized characters plus the tone that's just processed. diff --git a/third_party/libwebrtc/pc/sctp_data_channel.cc b/third_party/libwebrtc/pc/sctp_data_channel.cc @@ -84,11 +84,15 @@ BYPASS_PROXY_METHOD2(void, END_PROXY_MAP(DataChannel) } // namespace +#if defined(__clang__) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" +#endif InternalDataChannelInit::InternalDataChannelInit(const DataChannelInit& base) : DataChannelInit(base), open_handshake_role(kOpener) { +#if defined(__clang__) #pragma clang diagnostic pop +#endif // If the channel is externally negotiated, do not send the OPEN message. if (base.negotiated) { open_handshake_role = kNone;