[reland] Comment unused variables in implemented functions 10\n

Bug: webrtc:370878648
Change-Id: Icbfacf8113942f60ba168e4aa884f0172eaa0fca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/367080
Commit-Queue: Dor Hen <dorhen@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43336}
diff --git a/api/peer_connection_interface.h b/api/peer_connection_interface.h
index 6914408..0108a69 100644
--- a/api/peer_connection_interface.h
+++ b/api/peer_connection_interface.h
@@ -1315,22 +1315,22 @@
   // See https://w3c.github.io/webrtc-pc/#event-icecandidateerror
   virtual void OnIceCandidateError(const std::string& /* address */,
                                    int /* port */,
-                                   const std::string& url,
-                                   int error_code,
-                                   const std::string& error_text) {}
+                                   const std::string& /* url */,
+                                   int /* error_code */,
+                                   const std::string& /* error_text */) {}
 
   // Ice candidates have been removed.
   // TODO(honghaiz): Make this a pure virtual method when all its subclasses
   // implement it.
   virtual void OnIceCandidatesRemoved(
-      const std::vector<cricket::Candidate>& candidates) {}
+      const std::vector<cricket::Candidate>& /* candidates */) {}
 
   // Called when the ICE connection receiving status changes.
-  virtual void OnIceConnectionReceivingChange(bool receiving) {}
+  virtual void OnIceConnectionReceivingChange(bool /* receiving */) {}
 
   // Called when the selected candidate pair for the ICE connection changes.
   virtual void OnIceSelectedCandidatePairChanged(
-      const cricket::CandidatePairChangeEvent& event) {}
+      const cricket::CandidatePairChangeEvent& /* event */) {}
 
   // This is called when a receiver and its track are created.
   // TODO(zhihuang): Make this pure virtual when all subclasses implement it.
@@ -1338,8 +1338,9 @@
   // Plan users should prefer OnTrack, OnAddTrack is only called as backwards
   // compatibility (and is called in the exact same situations as OnTrack).
   virtual void OnAddTrack(
-      rtc::scoped_refptr<RtpReceiverInterface> receiver,
-      const std::vector<rtc::scoped_refptr<MediaStreamInterface>>& streams) {}
+      rtc::scoped_refptr<RtpReceiverInterface> /* receiver */,
+      const std::vector<
+          rtc::scoped_refptr<MediaStreamInterface>>& /* streams */) {}
 
   // This is called when signaling indicates a transceiver will be receiving
   // media from the remote endpoint. This is fired during a call to
diff --git a/audio/channel_send_unittest.cc b/audio/channel_send_unittest.cc
index 6c123a2..b415b5f 100644
--- a/audio/channel_send_unittest.cc
+++ b/audio/channel_send_unittest.cc
@@ -235,7 +235,7 @@
 
   std::vector<uint8_t> sent_audio_levels;
   auto send_rtp = [&](rtc::ArrayView<const uint8_t> data,
-                      const PacketOptions& options) {
+                      const PacketOptions& /* options */) {
     RtpPacketReceived packet(&extension_manager);
     packet.Parse(data);
     RTPHeader header;
diff --git a/call/call_perf_tests.cc b/call/call_perf_tests.cc
index dfda906..6ec41fe 100644
--- a/call/call_perf_tests.cc
+++ b/call/call_perf_tests.cc
@@ -746,7 +746,7 @@
 
     void OnVideoStreamsCreated(VideoSendStream* send_stream,
                                const std::vector<VideoReceiveStreamInterface*>&
-                                   receive_streams) override {
+                               /* receive_streams */) override {
       send_stream_ = send_stream;
     }
 
@@ -839,9 +839,9 @@
     }
 
     void OnTransportCreated(
-        test::PacketTransport* to_receiver,
+        test::PacketTransport* /* to_receiver */,
         SimulatedNetworkInterface* sender_network,
-        test::PacketTransport* to_sender,
+        test::PacketTransport* /* to_sender */,
         SimulatedNetworkInterface* receiver_network) override {
       send_simulated_network_ = sender_network;
       receive_simulated_network_ = receiver_network;
@@ -894,7 +894,7 @@
           Unit::kUnitless, ImprovementDirection::kNeitherIsBetter);
     }
 
-    void OnCallsCreated(Call* sender_call, Call* receiver_call) override {
+    void OnCallsCreated(Call* sender_call, Call* /* receiver_call */) override {
       sender_call_ = sender_call;
       BitrateConstraints bitrate_config;
       bitrate_config.min_bitrate_bps = min_bwe_;
@@ -960,8 +960,8 @@
       frame_generator_capturer->ChangeResolution(640, 360);
     }
 
-    void OnSinkWantsChanged(rtc::VideoSinkInterface<VideoFrame>* sink,
-                            const rtc::VideoSinkWants& wants) override {}
+    void OnSinkWantsChanged(rtc::VideoSinkInterface<VideoFrame>* /* sink */,
+                            const rtc::VideoSinkWants& /* wants */) override {}
 
     void ModifySenderBitrateConfig(
         BitrateConstraints* bitrate_config) override {
@@ -970,7 +970,7 @@
 
     void OnVideoStreamsCreated(VideoSendStream* send_stream,
                                const std::vector<VideoReceiveStreamInterface*>&
-                                   receive_streams) override {
+                               /* receive_streams */) override {
       send_stream_ = send_stream;
     }
 
@@ -980,7 +980,7 @@
 
     void ModifyVideoConfigs(
         VideoSendStream::Config* send_config,
-        std::vector<VideoReceiveStreamInterface::Config>* receive_configs,
+        std::vector<VideoReceiveStreamInterface::Config>* /* receive_configs */,
         VideoEncoderConfig* encoder_config) override {
       send_config->encoder_settings.encoder_factory = encoder_factory_;
       send_config->rtp.payload_name = payload_name_;
@@ -1021,7 +1021,7 @@
       }
     }
 
-    Action OnSendRtp(rtc::ArrayView<const uint8_t> packet) override {
+    Action OnSendRtp(rtc::ArrayView<const uint8_t> /* packet */) override {
       const Timestamp now = clock_->CurrentTime();
       if (now - last_getstats_time_ > kMinGetStatsInterval) {
         last_getstats_time_ = now;
@@ -1059,7 +1059,7 @@
   InternalEncoderFactory internal_encoder_factory;
   test::FunctionVideoEncoderFactory encoder_factory(
       [&internal_encoder_factory](const Environment& env,
-                                  const SdpVideoFormat& format) {
+                                  const SdpVideoFormat& /* format */) {
         return std::make_unique<SimulcastEncoderAdapter>(
             env, &internal_encoder_factory, nullptr, SdpVideoFormat::VP8());
       });
@@ -1072,7 +1072,7 @@
   InternalEncoderFactory internal_encoder_factory;
   test::FunctionVideoEncoderFactory encoder_factory(
       [&internal_encoder_factory](const Environment& env,
-                                  const SdpVideoFormat& format) {
+                                  const SdpVideoFormat& /* format */) {
         return std::make_unique<SimulcastEncoderAdapter>(
             env, &internal_encoder_factory, nullptr, SdpVideoFormat::VP8());
       });
diff --git a/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m b/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
index ab0d1b8..7c1dd98 100644
--- a/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
+++ b/examples/objc/AppRTCMobile/third_party/SocketRocket/SRWebSocket.m
@@ -527,9 +527,11 @@
         CFHTTPMessageSetHeaderFieldValue(request, CFSTR("Sec-WebSocket-Protocol"), (__bridge CFStringRef)[_requestedProtocols componentsJoinedByString:@", "]);
     }
 
-    [_urlRequest.allHTTPHeaderFields enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) {
-        CFHTTPMessageSetHeaderFieldValue(request, (__bridge CFStringRef)key, (__bridge CFStringRef)obj);
-    }];
+    [_urlRequest.allHTTPHeaderFields
+        enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop __unused) {
+          CFHTTPMessageSetHeaderFieldValue(
+              request, (__bridge CFStringRef)key, (__bridge CFStringRef)obj);
+        }];
 
     NSData *message = CFBridgingRelease(CFHTTPMessageCopySerializedMessage(request));
     
@@ -1627,7 +1629,7 @@
 
 //#define SR_ENABLE_LOG
 
-static inline void SRFastLog(NSString *format, ...)  {
+static inline void SRFastLog(NSString *format, ...) {
 #ifdef SR_ENABLE_LOG
     __block va_list arg_list;
     va_start (arg_list, format);
@@ -1637,10 +1639,12 @@
     va_end(arg_list);
     
     NSLog(@"[SR] %@", formattedString);
+#else
+  // Cannot use [[maybe_unused]] here since this file might compile with GCC in objc context.
+  (void)format;
 #endif
 }
 
-
 #ifdef HAS_ICU
 
 static inline int32_t validate_dispatch_data_partial_string(NSData *data) {
diff --git a/logging/rtc_event_log/events/rtc_event_generic_packet_sent.h b/logging/rtc_event_log/events/rtc_event_generic_packet_sent.h
index 031002c..15ad339 100644
--- a/logging/rtc_event_log/events/rtc_event_generic_packet_sent.h
+++ b/logging/rtc_event_log/events/rtc_event_generic_packet_sent.h
@@ -94,7 +94,7 @@
   static RtcEventLogParseStatus Parse(
       absl::string_view /* encoded_bytes */,
       bool /* batched */,
-      std::vector<LoggedGenericPacketSent>& output) {
+      std::vector<LoggedGenericPacketSent>& /* output */) {
     // TODO(terelius): Implement
     return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__);
   }
diff --git a/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h b/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h
index b927f1e..fed8b3c 100644
--- a/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h
+++ b/logging/rtc_event_log/events/rtc_event_probe_cluster_created.h
@@ -69,15 +69,15 @@
   uint32_t min_probes() const { return min_probes_; }
   uint32_t min_bytes() const { return min_bytes_; }
 
-  static std::string Encode(rtc::ArrayView<const RtcEvent*> batch) {
+  static std::string Encode(rtc::ArrayView<const RtcEvent*> /* batch */) {
     // TODO(terelius): Implement
     return "";
   }
 
   static RtcEventLogParseStatus Parse(
-      absl::string_view encoded_bytes,
-      bool batched,
-      std::vector<LoggedBweProbeClusterCreatedEvent>& output) {
+      absl::string_view /* encoded_bytes */,
+      bool /* batched */,
+      std::vector<LoggedBweProbeClusterCreatedEvent>& /* output */) {
     // TODO(terelius): Implement
     return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__);
   }
diff --git a/logging/rtc_event_log/events/rtc_event_probe_result_failure.h b/logging/rtc_event_log/events/rtc_event_probe_result_failure.h
index ca57d08..cd63b73 100644
--- a/logging/rtc_event_log/events/rtc_event_probe_result_failure.h
+++ b/logging/rtc_event_log/events/rtc_event_probe_result_failure.h
@@ -63,15 +63,15 @@
   int32_t id() const { return id_; }
   ProbeFailureReason failure_reason() const { return failure_reason_; }
 
-  static std::string Encode(rtc::ArrayView<const RtcEvent*> batch) {
+  static std::string Encode(rtc::ArrayView<const RtcEvent*> /* batch */) {
     // TODO(terelius): Implement
     return "";
   }
 
   static RtcEventLogParseStatus Parse(
-      absl::string_view encoded_bytes,
-      bool batched,
-      std::vector<LoggedBweProbeFailureEvent>& output) {
+      absl::string_view /* encoded_bytes */,
+      bool /* batched */,
+      std::vector<LoggedBweProbeFailureEvent>& /* output */) {
     // TODO(terelius): Implement
     return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__);
   }
diff --git a/logging/rtc_event_log/events/rtc_event_probe_result_success.h b/logging/rtc_event_log/events/rtc_event_probe_result_success.h
index 60f9023..44dc218 100644
--- a/logging/rtc_event_log/events/rtc_event_probe_result_success.h
+++ b/logging/rtc_event_log/events/rtc_event_probe_result_success.h
@@ -56,15 +56,15 @@
   int32_t id() const { return id_; }
   int32_t bitrate_bps() const { return bitrate_bps_; }
 
-  static std::string Encode(rtc::ArrayView<const RtcEvent*> batch) {
+  static std::string Encode(rtc::ArrayView<const RtcEvent*> /* batch */) {
     // TODO(terelius): Implement
     return "";
   }
 
   static RtcEventLogParseStatus Parse(
-      absl::string_view encoded_bytes,
-      bool batched,
-      std::vector<LoggedBweProbeSuccessEvent>& output) {
+      absl::string_view /* encoded_bytes */,
+      bool /* batched */,
+      std::vector<LoggedBweProbeSuccessEvent>& /* output */) {
     // TODO(terelius): Implement
     return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__);
   }
diff --git a/logging/rtc_event_log/events/rtc_event_remote_estimate.h b/logging/rtc_event_log/events/rtc_event_remote_estimate.h
index d01abe7..73333c7 100644
--- a/logging/rtc_event_log/events/rtc_event_remote_estimate.h
+++ b/logging/rtc_event_log/events/rtc_event_remote_estimate.h
@@ -48,15 +48,15 @@
   Type GetType() const override { return kType; }
   bool IsConfigEvent() const override { return false; }
 
-  static std::string Encode(rtc::ArrayView<const RtcEvent*> batch) {
+  static std::string Encode(rtc::ArrayView<const RtcEvent*> /* batch */) {
     // TODO(terelius): Implement
     return "";
   }
 
   static RtcEventLogParseStatus Parse(
-      absl::string_view encoded_bytes,
-      bool batched,
-      std::vector<LoggedRemoteEstimateEvent>& output) {
+      absl::string_view /* encoded_bytes */,
+      bool /* batched */,
+      std::vector<LoggedRemoteEstimateEvent>& /* output */) {
     // TODO(terelius): Implement
     return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__);
   }
diff --git a/logging/rtc_event_log/events/rtc_event_route_change.h b/logging/rtc_event_log/events/rtc_event_route_change.h
index 5ff2b29..0001aa6 100644
--- a/logging/rtc_event_log/events/rtc_event_route_change.h
+++ b/logging/rtc_event_log/events/rtc_event_route_change.h
@@ -53,15 +53,15 @@
   bool connected() const { return connected_; }
   uint32_t overhead() const { return overhead_; }
 
-  static std::string Encode(rtc::ArrayView<const RtcEvent*> batch) {
+  static std::string Encode(rtc::ArrayView<const RtcEvent*> /* batch */) {
     // TODO(terelius): Implement
     return "";
   }
 
   static RtcEventLogParseStatus Parse(
-      absl::string_view encoded_bytes,
-      bool batched,
-      std::vector<LoggedRouteChangeEvent>& output) {
+      absl::string_view /* encoded_bytes */,
+      bool /* batched */,
+      std::vector<LoggedRouteChangeEvent>& /* output */) {
     // TODO(terelius): Implement
     return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__);
   }
diff --git a/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h b/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h
index d506fc7..b05e30b 100644
--- a/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h
+++ b/logging/rtc_event_log/events/rtc_event_video_receive_stream_config.h
@@ -53,15 +53,15 @@
 
   const rtclog::StreamConfig& config() const { return *config_; }
 
-  static std::string Encode(rtc::ArrayView<const RtcEvent*> batch) {
+  static std::string Encode(rtc::ArrayView<const RtcEvent*> /* batch */) {
     // TODO(terelius): Implement
     return "";
   }
 
   static RtcEventLogParseStatus Parse(
-      absl::string_view encoded_bytes,
-      bool batched,
-      std::vector<LoggedVideoRecvConfig>& output) {
+      absl::string_view /* encoded_bytes */,
+      bool /* batched */,
+      std::vector<LoggedVideoRecvConfig>& /* output */) {
     // TODO(terelius): Implement
     return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__);
   }
diff --git a/logging/rtc_event_log/events/rtc_event_video_send_stream_config.h b/logging/rtc_event_log/events/rtc_event_video_send_stream_config.h
index f007055..baca0ee 100644
--- a/logging/rtc_event_log/events/rtc_event_video_send_stream_config.h
+++ b/logging/rtc_event_log/events/rtc_event_video_send_stream_config.h
@@ -53,15 +53,15 @@
 
   const rtclog::StreamConfig& config() const { return *config_; }
 
-  static std::string Encode(rtc::ArrayView<const RtcEvent*> batch) {
+  static std::string Encode(rtc::ArrayView<const RtcEvent*> /* batch */) {
     // TODO(terelius): Implement
     return "";
   }
 
   static RtcEventLogParseStatus Parse(
-      absl::string_view encoded_bytes,
-      bool batched,
-      std::vector<LoggedVideoSendConfig>& output) {
+      absl::string_view /* encoded_bytes */,
+      bool /* batched */,
+      std::vector<LoggedVideoSendConfig>& /* output */) {
     // TODO(terelius): Implement
     return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__);
   }
diff --git a/logging/rtc_event_log/fake_rtc_event_log.cc b/logging/rtc_event_log/fake_rtc_event_log.cc
index 836492fa..ca6b1c4 100644
--- a/logging/rtc_event_log/fake_rtc_event_log.cc
+++ b/logging/rtc_event_log/fake_rtc_event_log.cc
@@ -20,8 +20,9 @@
 
 namespace webrtc {
 
-bool FakeRtcEventLog::StartLogging(std::unique_ptr<RtcEventLogOutput> output,
-                                   int64_t output_period_ms) {
+bool FakeRtcEventLog::StartLogging(
+    std::unique_ptr<RtcEventLogOutput> /* output */,
+    int64_t /* output_period_ms */) {
   return true;
 }
 
diff --git a/media/base/adapted_video_track_source.h b/media/base/adapted_video_track_source.h
index 670331d..6bf9086 100644
--- a/media/base/adapted_video_track_source.h
+++ b/media/base/adapted_video_track_source.h
@@ -86,9 +86,11 @@
   bool SupportsEncodedOutput() const override { return false; }
   void GenerateKeyFrame() override {}
   void AddEncodedSink(
-      rtc::VideoSinkInterface<webrtc::RecordableEncodedFrame>* sink) override {}
+      rtc::VideoSinkInterface<webrtc::RecordableEncodedFrame>* /* sink */)
+      override {}
   void RemoveEncodedSink(
-      rtc::VideoSinkInterface<webrtc::RecordableEncodedFrame>* sink) override {}
+      rtc::VideoSinkInterface<webrtc::RecordableEncodedFrame>* /* sink */)
+      override {}
   void ProcessConstraints(
       const webrtc::VideoTrackSourceConstraints& constraints) override;
 
diff --git a/media/base/media_engine.h b/media/base/media_engine.h
index 780bac0..ea89116 100644
--- a/media/base/media_engine.h
+++ b/media/base/media_engine.h
@@ -105,22 +105,22 @@
   virtual rtc::scoped_refptr<webrtc::AudioState> GetAudioState() const = 0;
 
   virtual std::unique_ptr<VoiceMediaSendChannelInterface> CreateSendChannel(
-      webrtc::Call* call,
-      const MediaConfig& config,
-      const AudioOptions& options,
-      const webrtc::CryptoOptions& crypto_options,
-      webrtc::AudioCodecPairId codec_pair_id) {
+      webrtc::Call* /* call */,
+      const MediaConfig& /* config */,
+      const AudioOptions& /* options */,
+      const webrtc::CryptoOptions& /* crypto_options */,
+      webrtc::AudioCodecPairId /* codec_pair_id */) {
     // TODO(hta): Make pure virtual when all downstream has updated
     RTC_CHECK_NOTREACHED();
     return nullptr;
   }
 
   virtual std::unique_ptr<VoiceMediaReceiveChannelInterface>
-  CreateReceiveChannel(webrtc::Call* call,
-                       const MediaConfig& config,
-                       const AudioOptions& options,
-                       const webrtc::CryptoOptions& crypto_options,
-                       webrtc::AudioCodecPairId codec_pair_id) {
+  CreateReceiveChannel(webrtc::Call* /* call */,
+                       const MediaConfig& /* config */,
+                       const AudioOptions& /* options */,
+                       const webrtc::CryptoOptions& /* crypto_options */,
+                       webrtc::AudioCodecPairId /* codec_pair_id */) {
     // TODO(hta): Make pure virtual when all downstream has updated
     RTC_CHECK_NOTREACHED();
     return nullptr;
@@ -155,21 +155,22 @@
   VideoEngineInterface& operator=(const VideoEngineInterface&) = delete;
 
   virtual std::unique_ptr<VideoMediaSendChannelInterface> CreateSendChannel(
-      webrtc::Call* call,
-      const MediaConfig& config,
-      const VideoOptions& options,
-      const webrtc::CryptoOptions& crypto_options,
-      webrtc::VideoBitrateAllocatorFactory* video_bitrate_allocator_factory) {
+      webrtc::Call* /* call */,
+      const MediaConfig& /* config */,
+      const VideoOptions& /* options */,
+      const webrtc::CryptoOptions& /* crypto_options */,
+      webrtc::
+          VideoBitrateAllocatorFactory* /* video_bitrate_allocator_factory */) {
     // Default implementation, delete when all is updated
     RTC_CHECK_NOTREACHED();
     return nullptr;
   }
 
   virtual std::unique_ptr<VideoMediaReceiveChannelInterface>
-  CreateReceiveChannel(webrtc::Call* call,
-                       const MediaConfig& config,
-                       const VideoOptions& options,
-                       const webrtc::CryptoOptions& crypto_options) {
+  CreateReceiveChannel(webrtc::Call* /* call */,
+                       const MediaConfig& /* config */,
+                       const VideoOptions& /* options */,
+                       const webrtc::CryptoOptions& /* crypto_options */) {
     // Default implementation, delete when all is updated
     RTC_CHECK_NOTREACHED();
     return nullptr;
diff --git a/media/base/rtp_utils.cc b/media/base/rtp_utils.cc
index 9546ed6..bbfead5 100644
--- a/media/base/rtp_utils.cc
+++ b/media/base/rtp_utils.cc
@@ -238,7 +238,7 @@
 // ValidateRtpHeader() must be called before this method to make sure, we have
 // a sane rtp packet.
 bool UpdateRtpAbsSendTimeExtension(uint8_t* rtp,
-                                   size_t length,
+                                   size_t /* length */,
                                    int extension_id,
                                    uint64_t time_us) {
   //  0                   1                   2                   3