[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}
This commit is contained in:
Dor Hen 2024-10-30 11:44:20 +02:00 committed by WebRTC LUCI CQ
parent caf943dc2d
commit 297fe1a2d9
16 changed files with 87 additions and 78 deletions

View File

@ -1315,22 +1315,22 @@ class PeerConnectionObserver {
// 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 @@ class PeerConnectionObserver {
// 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

View File

@ -235,7 +235,7 @@ TEST_F(ChannelSendTest, AudioLevelsAttachedToCorrectTransformedFrame) {
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;

View File

@ -746,7 +746,7 @@ TEST_F(CallPerfTest, MAYBE_KeepsHighBitrateWhenReconfiguringSender) {
void OnVideoStreamsCreated(VideoSendStream* send_stream,
const std::vector<VideoReceiveStreamInterface*>&
receive_streams) override {
/* receive_streams */) override {
send_stream_ = send_stream;
}
@ -839,9 +839,9 @@ void CallPerfTest::TestMinAudioVideoBitrate(int test_bitrate_from,
}
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 @@ void CallPerfTest::TestMinAudioVideoBitrate(int test_bitrate_from,
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 @@ void CallPerfTest::TestEncodeFramerate(VideoEncoderFactory* encoder_factory,
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 CallPerfTest::TestEncodeFramerate(VideoEncoderFactory* encoder_factory,
void OnVideoStreamsCreated(VideoSendStream* send_stream,
const std::vector<VideoReceiveStreamInterface*>&
receive_streams) override {
/* receive_streams */) override {
send_stream_ = send_stream;
}
@ -980,7 +980,7 @@ void CallPerfTest::TestEncodeFramerate(VideoEncoderFactory* encoder_factory,
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 @@ void CallPerfTest::TestEncodeFramerate(VideoEncoderFactory* encoder_factory,
}
}
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 @@ TEST_F(CallPerfTest, TestEncodeFramerateVp8Simulcast) {
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 @@ TEST_F(CallPerfTest, TestEncodeFramerateVp8SimulcastLowerInputFps) {
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());
});

View File

@ -527,8 +527,10 @@ static __strong NSData *CRLFCRLF;
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));
@ -1637,10 +1639,12 @@ static inline void SRFastLog(NSString *format, ...) {
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) {

View File

@ -94,7 +94,7 @@ class RtcEventGenericPacketSent final : public RtcEvent {
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__);
}

View File

@ -69,15 +69,15 @@ class RtcEventProbeClusterCreated final : public RtcEvent {
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__);
}

View File

@ -63,15 +63,15 @@ class RtcEventProbeResultFailure final : public RtcEvent {
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__);
}

View File

@ -56,15 +56,15 @@ class RtcEventProbeResultSuccess final : public RtcEvent {
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__);
}

View File

@ -48,15 +48,15 @@ class RtcEventRemoteEstimate final : public RtcEvent {
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__);
}

View File

@ -53,15 +53,15 @@ class RtcEventRouteChange final : public RtcEvent {
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__);
}

View File

@ -53,15 +53,15 @@ class RtcEventVideoReceiveStreamConfig final : public RtcEvent {
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__);
}

View File

@ -53,15 +53,15 @@ class RtcEventVideoSendStreamConfig final : public RtcEvent {
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__);
}

View File

@ -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;
}

View File

@ -86,9 +86,11 @@ class RTC_EXPORT AdaptedVideoTrackSource
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;

View File

@ -105,22 +105,22 @@ class VoiceEngineInterface : public RtpHeaderExtensionQueryInterface {
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 @@ class VideoEngineInterface : public RtpHeaderExtensionQueryInterface {
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;

View File

@ -238,7 +238,7 @@ bool ValidateRtpHeader(const uint8_t* rtp,
// 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