File: s0132.patch

package info (click to toggle)
firefox 149.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 4,767,760 kB
  • sloc: cpp: 7,416,064; javascript: 6,752,859; ansic: 3,774,850; python: 1,250,473; xml: 641,578; asm: 439,191; java: 186,617; sh: 56,634; makefile: 18,856; objc: 13,092; perl: 12,763; pascal: 5,960; yacc: 4,583; cs: 3,846; lex: 1,720; ruby: 1,002; php: 436; lisp: 258; awk: 105; sql: 66; sed: 53; csh: 10; exp: 6
file content (164 lines) | stat: -rw-r--r-- 6,174 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
From: Dan Baker <dbaker@mozilla.com>
Date: Wed, 3 Dec 2025 10:19:00 -0700
Subject: Bug 2000941 - (fix-5efb280e2b) fix build issue by adding check for
 clang before utilizing #pragma clang

Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/e30031be03fd478848bc83e40c479d1f21cbab8c
---
 api/audio/audio_processing_statistics.cc                | 4 ++++
 api/audio/audio_processing_statistics.h                 | 4 ++++
 api/data_channel_interface.h                            | 4 ++++
 modules/audio_processing/include/audio_frame_proxies.cc | 6 ++++++
 pc/dtmf_sender.cc                                       | 8 ++++++++
 pc/sctp_data_channel.cc                                 | 4 ++++
 6 files changed, 30 insertions(+)

diff --git a/api/audio/audio_processing_statistics.cc b/api/audio/audio_processing_statistics.cc
index b6e92eaa12..a5cb89de7f 100644
--- a/api/audio/audio_processing_statistics.cc
+++ b/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/api/audio/audio_processing_statistics.h b/api/audio/audio_processing_statistics.h
index 897af0c2c3..53e882cb8b 100644
--- a/api/audio/audio_processing_statistics.h
+++ b/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/api/data_channel_interface.h b/api/data_channel_interface.h
index 1dc737f80b..544d8edaf9 100644
--- a/api/data_channel_interface.h
+++ b/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/modules/audio_processing/include/audio_frame_proxies.cc b/modules/audio_processing/include/audio_frame_proxies.cc
index 84523250a5..ecd5b177f1 100644
--- a/modules/audio_processing/include/audio_frame_proxies.cc
+++ b/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/pc/dtmf_sender.cc b/pc/dtmf_sender.cc
index 7890e58841..4d8a540a17 100644
--- a/pc/dtmf_sender.cc
+++ b/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/pc/sctp_data_channel.cc b/pc/sctp_data_channel.cc
index 18a8e8ab6b..9f32b7b5f8 100644
--- a/pc/sctp_data_channel.cc
+++ b/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;