Comment unused variables in implemented functions 15\n

Bug: webrtc:370878648
Change-Id: I4529c17f54c653864cca27097e44c843210b9c52
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368061
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43429}
This commit is contained in:
Dor Hen 2024-11-20 12:15:38 +02:00 committed by WebRTC LUCI CQ
parent 4c5e72e3e0
commit da7b7ca1c1
49 changed files with 175 additions and 155 deletions

View File

@ -116,7 +116,7 @@ class PayloadTypeSuggesterForTests : public PayloadTypeSuggester {
} }
RTCError AddLocalMapping(const std::string& /* mid */, RTCError AddLocalMapping(const std::string& /* mid */,
PayloadType /* payload_type */, PayloadType /* payload_type */,
const cricket::Codec& codec) override { const cricket::Codec& /* codec */) override {
return RTCError::OK(); return RTCError::OK();
} }
@ -545,9 +545,9 @@ std::unique_ptr<Call> Call::Create(CallConfig config) {
// Call perf test will use Internal::Call::CreateVideoSendStream() to inject // Call perf test will use Internal::Call::CreateVideoSendStream() to inject
// FecController. // FecController.
VideoSendStream* Call::CreateVideoSendStream( VideoSendStream* Call::CreateVideoSendStream(
VideoSendStream::Config config, VideoSendStream::Config /* config */,
VideoEncoderConfig encoder_config, VideoEncoderConfig /* encoder_config */,
std::unique_ptr<FecController> fec_controller) { std::unique_ptr<FecController> /* fec_controller */) {
return nullptr; return nullptr;
} }

View File

@ -241,7 +241,7 @@ TEST(TaskQueuePacedSenderTest, ReschedulesProcessOnRateChange) {
EXPECT_CALL(packet_router, SendPacket) EXPECT_CALL(packet_router, SendPacket)
.Times(3) .Times(3)
.WillRepeatedly([&](std::unique_ptr<RtpPacketToSend> /* packet */, .WillRepeatedly([&](std::unique_ptr<RtpPacketToSend> /* packet */,
const PacedPacketInfo& cluster_info) { const PacedPacketInfo& /* cluster_info */) {
if (first_packet_time.IsInfinite()) { if (first_packet_time.IsInfinite()) {
first_packet_time = time_controller.GetClock()->CurrentTime(); first_packet_time = time_controller.GetClock()->CurrentTime();
} else if (second_packet_time.IsInfinite()) { } else if (second_packet_time.IsInfinite()) {

View File

@ -463,7 +463,7 @@ int VCMFecMethod::BitsPerFrame(const VCMProtectionParameters* parameters) {
} }
bool VCMFecMethod::EffectivePacketLoss( bool VCMFecMethod::EffectivePacketLoss(
const VCMProtectionParameters* parameters) { const VCMProtectionParameters* /* parameters */) {
// Effective packet loss to encoder is based on RPL (residual packet loss) // Effective packet loss to encoder is based on RPL (residual packet loss)
// this is a soft setting based on degree of FEC protection // this is a soft setting based on degree of FEC protection
// RPL = received/input packet loss - average_FEC_recovery // RPL = received/input packet loss - average_FEC_recovery

View File

@ -34,7 +34,7 @@ class TestNackRequester : public ::testing::Test,
void SetUp() override {} void SetUp() override {}
void SendNack(const std::vector<uint16_t>& sequence_numbers, void SendNack(const std::vector<uint16_t>& sequence_numbers,
bool buffering_allowed) override { bool /* buffering_allowed */) override {
sent_nacks_.insert(sent_nacks_.end(), sequence_numbers.begin(), sent_nacks_.insert(sent_nacks_.end(), sequence_numbers.begin(),
sequence_numbers.end()); sequence_numbers.end());
if (waiting_for_send_nack_) { if (waiting_for_send_nack_) {
@ -276,7 +276,7 @@ class TestNackRequesterWithFieldTrial : public ::testing::Test,
keyframes_requested_(0) {} keyframes_requested_(0) {}
void SendNack(const std::vector<uint16_t>& sequence_numbers, void SendNack(const std::vector<uint16_t>& sequence_numbers,
bool buffering_allowed) override { bool /* buffering_allowed */) override {
sent_nacks_.insert(sent_nacks_.end(), sequence_numbers.begin(), sent_nacks_.insert(sent_nacks_.end(), sequence_numbers.begin(),
sequence_numbers.end()); sequence_numbers.end());
} }

View File

@ -114,9 +114,9 @@ RtpFrameReferenceFinderImpl::PaddingReceived(uint16_t seq_num) {
void RtpFrameReferenceFinderImpl::ClearTo(uint16_t seq_num) { void RtpFrameReferenceFinderImpl::ClearTo(uint16_t seq_num) {
struct ClearToVisitor { struct ClearToVisitor {
void operator()(absl::monostate& ref_finder) {} void operator()(absl::monostate& /* ref_finder */) {}
void operator()(RtpGenericFrameRefFinder& ref_finder) {} void operator()(RtpGenericFrameRefFinder& /* ref_finder */) {}
void operator()(RtpFrameIdOnlyRefFinder& ref_finder) {} void operator()(RtpFrameIdOnlyRefFinder& /* ref_finder */) {}
void operator()(RtpSeqNumOnlyRefFinder& ref_finder) { void operator()(RtpSeqNumOnlyRefFinder& ref_finder) {
ref_finder.ClearTo(seq_num); ref_finder.ClearTo(seq_num);
} }

View File

@ -150,7 +150,7 @@ class TestRtpFrameReferenceFinder : public ::testing::Test {
RefsToSet(m, refs...); RefsToSet(m, refs...);
} }
void RefsToSet(std::set<int64_t>* m) const {} void RefsToSet(std::set<int64_t>* /* m */) const {}
Random rand_; Random rand_;
std::unique_ptr<RtpFrameReferenceFinder> reference_finder_; std::unique_ptr<RtpFrameReferenceFinder> reference_finder_;

View File

@ -283,7 +283,7 @@ void SimulcastRateAllocator::DistributeAllocationToTemporalLayers(
std::vector<uint32_t> SimulcastRateAllocator::DefaultTemporalLayerAllocation( std::vector<uint32_t> SimulcastRateAllocator::DefaultTemporalLayerAllocation(
int bitrate_kbps, int bitrate_kbps,
int max_bitrate_kbps, int /* max_bitrate_kbps */,
int simulcast_id) const { int simulcast_id) const {
const size_t num_temporal_layers = NumTemporalStreams(simulcast_id); const size_t num_temporal_layers = NumTemporalStreams(simulcast_id);
std::vector<uint32_t> bitrates; std::vector<uint32_t> bitrates;

View File

@ -145,13 +145,14 @@ class SimulcastTestFixtureImpl::TestDecodedImageCallback
decoded_frames_++; decoded_frames_++;
return 0; return 0;
} }
int32_t Decoded(VideoFrame& decoded_image, int64_t decode_time_ms) override { int32_t Decoded(VideoFrame& /* decoded_image */,
int64_t /* decode_time_ms */) override {
RTC_DCHECK_NOTREACHED(); RTC_DCHECK_NOTREACHED();
return -1; return -1;
} }
void Decoded(VideoFrame& decoded_image, void Decoded(VideoFrame& decoded_image,
std::optional<int32_t> decode_time_ms, std::optional<int32_t> /* decode_time_ms */,
std::optional<uint8_t> qp) override { std::optional<uint8_t> /* qp */) override {
Decoded(decoded_image); Decoded(decoded_image);
} }
int DecodedFrames() { return decoded_frames_; } int DecodedFrames() { return decoded_frames_; }
@ -921,9 +922,9 @@ void SimulcastTestFixtureImpl::TestDecodeWidthHeightSet() {
EXPECT_CALL(encoder_callback, OnEncodedImage(_, _)) EXPECT_CALL(encoder_callback, OnEncodedImage(_, _))
.Times(3) .Times(3)
.WillRepeatedly( .WillRepeatedly(::testing::Invoke(
::testing::Invoke([&](const EncodedImage& encoded_image, [&](const EncodedImage& encoded_image,
const CodecSpecificInfo* codec_specific_info) { const CodecSpecificInfo* /* codec_specific_info */) {
EXPECT_EQ(encoded_image._frameType, VideoFrameType::kVideoFrameKey); EXPECT_EQ(encoded_image._frameType, VideoFrameType::kVideoFrameKey);
size_t index = encoded_image.SimulcastIndex().value_or(0); size_t index = encoded_image.SimulcastIndex().value_or(0);
@ -936,30 +937,33 @@ void SimulcastTestFixtureImpl::TestDecodeWidthHeightSet() {
EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL)); EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL));
EXPECT_CALL(decoder_callback, Decoded(_, _, _)) EXPECT_CALL(decoder_callback, Decoded(_, _, _))
.WillOnce(::testing::Invoke([](VideoFrame& decodedImage, .WillOnce(
std::optional<int32_t> decode_time_ms, ::testing::Invoke([](VideoFrame& decodedImage,
std::optional<uint8_t> qp) { std::optional<int32_t> /* decode_time_ms */,
EXPECT_EQ(decodedImage.width(), kDefaultWidth / 4); std::optional<uint8_t> /* qp */) {
EXPECT_EQ(decodedImage.height(), kDefaultHeight / 4); EXPECT_EQ(decodedImage.width(), kDefaultWidth / 4);
})); EXPECT_EQ(decodedImage.height(), kDefaultHeight / 4);
}));
EXPECT_EQ(0, decoder_->Decode(encoded_frame[0], 0)); EXPECT_EQ(0, decoder_->Decode(encoded_frame[0], 0));
EXPECT_CALL(decoder_callback, Decoded(_, _, _)) EXPECT_CALL(decoder_callback, Decoded(_, _, _))
.WillOnce(::testing::Invoke([](VideoFrame& decodedImage, .WillOnce(
std::optional<int32_t> decode_time_ms, ::testing::Invoke([](VideoFrame& decodedImage,
std::optional<uint8_t> qp) { std::optional<int32_t> /* decode_time_ms */,
EXPECT_EQ(decodedImage.width(), kDefaultWidth / 2); std::optional<uint8_t> /* qp */) {
EXPECT_EQ(decodedImage.height(), kDefaultHeight / 2); EXPECT_EQ(decodedImage.width(), kDefaultWidth / 2);
})); EXPECT_EQ(decodedImage.height(), kDefaultHeight / 2);
}));
EXPECT_EQ(0, decoder_->Decode(encoded_frame[1], 0)); EXPECT_EQ(0, decoder_->Decode(encoded_frame[1], 0));
EXPECT_CALL(decoder_callback, Decoded(_, _, _)) EXPECT_CALL(decoder_callback, Decoded(_, _, _))
.WillOnce(::testing::Invoke([](VideoFrame& decodedImage, .WillOnce(
std::optional<int32_t> decode_time_ms, ::testing::Invoke([](VideoFrame& decodedImage,
std::optional<uint8_t> qp) { std::optional<int32_t> /* decode_time_ms */,
EXPECT_EQ(decodedImage.width(), kDefaultWidth); std::optional<uint8_t> /* qp */) {
EXPECT_EQ(decodedImage.height(), kDefaultHeight); EXPECT_EQ(decodedImage.width(), kDefaultWidth);
})); EXPECT_EQ(decodedImage.height(), kDefaultHeight);
}));
EXPECT_EQ(0, decoder_->Decode(encoded_frame[2], 0)); EXPECT_EQ(0, decoder_->Decode(encoded_frame[2], 0));
} }

View File

@ -12,8 +12,8 @@
namespace webrtc { namespace webrtc {
void VCMReceiveCallback::OnDroppedFrames(uint32_t frames_dropped) {} void VCMReceiveCallback::OnDroppedFrames(uint32_t /* frames_dropped */) {}
void VCMReceiveCallback::OnIncomingPayloadType(int payload_type) {} void VCMReceiveCallback::OnIncomingPayloadType(int /* payload_type */) {}
void VCMReceiveCallback::OnDecoderInfoChanged( void VCMReceiveCallback::OnDecoderInfoChanged(
const VideoDecoder::DecoderInfo&) {} const VideoDecoder::DecoderInfo&) {}

View File

@ -28,7 +28,7 @@ class FuzzerTimeout : public Timeout {
explicit FuzzerTimeout(std::set<TimeoutID>& active_timeouts) explicit FuzzerTimeout(std::set<TimeoutID>& active_timeouts)
: active_timeouts_(active_timeouts) {} : active_timeouts_(active_timeouts) {}
void Start(DurationMs duration_ms, TimeoutID timeout_id) override { void Start(DurationMs /* duration_ms */, TimeoutID timeout_id) override {
// Start is only allowed to be called on stopped or expired timeouts. // Start is only allowed to be called on stopped or expired timeouts.
if (timeout_id_.has_value()) { if (timeout_id_.has_value()) {
// It has been started before, but maybe it expired. Ensure that it's not // It has been started before, but maybe it expired. Ensure that it's not
@ -60,22 +60,25 @@ class FuzzerCallbacks : public DcSctpSocketCallbacks {
sent_packets_.emplace_back(std::vector<uint8_t>(data.begin(), data.end())); sent_packets_.emplace_back(std::vector<uint8_t>(data.begin(), data.end()));
} }
std::unique_ptr<Timeout> CreateTimeout( std::unique_ptr<Timeout> CreateTimeout(
webrtc::TaskQueueBase::DelayPrecision precision) override { webrtc::TaskQueueBase::DelayPrecision /* precision */) override {
// The fuzzer timeouts don't implement |precision|. // The fuzzer timeouts don't implement |precision|.
return std::make_unique<FuzzerTimeout>(active_timeouts_); return std::make_unique<FuzzerTimeout>(active_timeouts_);
} }
webrtc::Timestamp Now() override { return webrtc::Timestamp::Millis(42); } webrtc::Timestamp Now() override { return webrtc::Timestamp::Millis(42); }
uint32_t GetRandomInt(uint32_t low, uint32_t high) override { uint32_t GetRandomInt(uint32_t /* low */, uint32_t /* high */) override {
return kRandomValue; return kRandomValue;
} }
void OnMessageReceived(DcSctpMessage message) override {} void OnMessageReceived(DcSctpMessage /* message */) override {}
void OnError(ErrorKind error, absl::string_view message) override {} void OnError(ErrorKind /* error */,
void OnAborted(ErrorKind error, absl::string_view message) override {} absl::string_view /* message */) override {}
void OnAborted(ErrorKind /* error */,
absl::string_view /* message */) override {}
void OnConnected() override {} void OnConnected() override {}
void OnClosed() override {} void OnClosed() override {}
void OnConnectionRestarted() override {} void OnConnectionRestarted() override {}
void OnStreamsResetFailed(rtc::ArrayView<const StreamID> outgoing_streams, void OnStreamsResetFailed(
absl::string_view reason) override {} rtc::ArrayView<const StreamID> /* outgoing_streams */,
absl::string_view /* reason */) override {}
void OnStreamsResetPerformed( void OnStreamsResetPerformed(
rtc::ArrayView<const StreamID> outgoing_streams) override {} rtc::ArrayView<const StreamID> outgoing_streams) override {}
void OnIncomingStreamsReset( void OnIncomingStreamsReset(

View File

@ -287,7 +287,7 @@ class DcSctpSocketCallbacks {
// //
// Note that it's NOT ALLOWED to call into this library from within this // Note that it's NOT ALLOWED to call into this library from within this
// callback. // callback.
virtual void SendPacket(rtc::ArrayView<const uint8_t> data) {} virtual void SendPacket(rtc::ArrayView<const uint8_t> /* data */) {}
// Called when the library wants the packet serialized as `data` to be sent. // Called when the library wants the packet serialized as `data` to be sent.
// //
@ -312,7 +312,7 @@ class DcSctpSocketCallbacks {
// Note that it's NOT ALLOWED to call into this library from within this // Note that it's NOT ALLOWED to call into this library from within this
// callback. // callback.
virtual std::unique_ptr<Timeout> CreateTimeout( virtual std::unique_ptr<Timeout> CreateTimeout(
webrtc::TaskQueueBase::DelayPrecision precision) { webrtc::TaskQueueBase::DelayPrecision /* precision */) {
// TODO(hbos): When dependencies have migrated to this new signature, make // TODO(hbos): When dependencies have migrated to this new signature, make
// this pure virtual and delete the other version. // this pure virtual and delete the other version.
return CreateTimeout(); return CreateTimeout();
@ -423,7 +423,7 @@ class DcSctpSocketCallbacks {
// below the threshold set when calling `SetBufferedAmountLowThreshold`. // below the threshold set when calling `SetBufferedAmountLowThreshold`.
// //
// It is allowed to call into this library from within this callback. // It is allowed to call into this library from within this callback.
virtual void OnBufferedAmountLow(StreamID stream_id) {} virtual void OnBufferedAmountLow(StreamID /* stream_id */) {}
// Will be called when the total amount of data buffered (in the entire send // Will be called when the total amount of data buffered (in the entire send
// buffer, for all streams) falls to or below the threshold specified in // buffer, for all streams) falls to or below the threshold specified in
@ -456,7 +456,7 @@ class DcSctpSocketCallbacks {
// //
// Note that it's NOT ALLOWED to call into this library from within this // Note that it's NOT ALLOWED to call into this library from within this
// callback. // callback.
virtual void OnLifecycleMessageFullySent(LifecycleId lifecycle_id) {} virtual void OnLifecycleMessageFullySent(LifecycleId /* lifecycle_id */) {}
// OnLifecycleMessageExpired will be called when a message has expired. If it // OnLifecycleMessageExpired will be called when a message has expired. If it
// was expired with data remaining in the send queue that had not been sent // was expired with data remaining in the send queue that had not been sent
@ -474,8 +474,8 @@ class DcSctpSocketCallbacks {
// //
// Note that it's NOT ALLOWED to call into this library from within this // Note that it's NOT ALLOWED to call into this library from within this
// callback. // callback.
virtual void OnLifecycleMessageExpired(LifecycleId lifecycle_id, virtual void OnLifecycleMessageExpired(LifecycleId /* lifecycle_id */,
bool maybe_delivered) {} bool /* maybe_delivered */) {}
// OnLifecycleMessageDelivered will be called when a non-expired message has // OnLifecycleMessageDelivered will be called when a non-expired message has
// been acknowledged by the peer as delivered. // been acknowledged by the peer as delivered.
@ -493,7 +493,7 @@ class DcSctpSocketCallbacks {
// //
// Note that it's NOT ALLOWED to call into this library from within this // Note that it's NOT ALLOWED to call into this library from within this
// callback. // callback.
virtual void OnLifecycleMessageDelivered(LifecycleId lifecycle_id) {} virtual void OnLifecycleMessageDelivered(LifecycleId /* lifecycle_id */) {}
// OnLifecycleEnd will be called when a lifecycle event has reached its end. // OnLifecycleEnd will be called when a lifecycle event has reached its end.
// It will be called when processing of a message is complete, no matter how // It will be called when processing of a message is complete, no matter how
@ -513,7 +513,7 @@ class DcSctpSocketCallbacks {
// //
// Note that it's NOT ALLOWED to call into this library from within this // Note that it's NOT ALLOWED to call into this library from within this
// callback. // callback.
virtual void OnLifecycleEnd(LifecycleId lifecycle_id) {} virtual void OnLifecycleEnd(LifecycleId /* lifecycle_id */) {}
}; };
// The DcSctpSocket implementation implements the following interface. // The DcSctpSocket implementation implements the following interface.

View File

@ -221,7 +221,7 @@ int InterleavedReassemblyStreams::Add(UnwrappedTSN tsn, Data data) {
} }
size_t InterleavedReassemblyStreams::HandleForwardTsn( size_t InterleavedReassemblyStreams::HandleForwardTsn(
UnwrappedTSN new_cumulative_ack_tsn, UnwrappedTSN /* new_cumulative_ack_tsn */,
rtc::ArrayView<const AnyForwardTsnChunk::SkippedStream> skipped_streams) { rtc::ArrayView<const AnyForwardTsnChunk::SkippedStream> skipped_streams) {
size_t removed_bytes = 0; size_t removed_bytes = 0;
for (const auto& skipped : skipped_streams) { for (const auto& skipped : skipped_streams) {

View File

@ -92,7 +92,7 @@ void CallbackDeferrer::OnAborted(ErrorKind error, absl::string_view message) {
void CallbackDeferrer::OnConnected() { void CallbackDeferrer::OnConnected() {
RTC_DCHECK(prepared_); RTC_DCHECK(prepared_);
deferred_.emplace_back( deferred_.emplace_back(
+[](CallbackData data, DcSctpSocketCallbacks& cb) { +[](CallbackData /* data */, DcSctpSocketCallbacks& cb) {
return cb.OnConnected(); return cb.OnConnected();
}, },
absl::monostate{}); absl::monostate{});
@ -101,7 +101,7 @@ void CallbackDeferrer::OnConnected() {
void CallbackDeferrer::OnClosed() { void CallbackDeferrer::OnClosed() {
RTC_DCHECK(prepared_); RTC_DCHECK(prepared_);
deferred_.emplace_back( deferred_.emplace_back(
+[](CallbackData data, DcSctpSocketCallbacks& cb) { +[](CallbackData /* data */, DcSctpSocketCallbacks& cb) {
return cb.OnClosed(); return cb.OnClosed();
}, },
absl::monostate{}); absl::monostate{});
@ -110,7 +110,7 @@ void CallbackDeferrer::OnClosed() {
void CallbackDeferrer::OnConnectionRestarted() { void CallbackDeferrer::OnConnectionRestarted() {
RTC_DCHECK(prepared_); RTC_DCHECK(prepared_);
deferred_.emplace_back( deferred_.emplace_back(
+[](CallbackData data, DcSctpSocketCallbacks& cb) { +[](CallbackData /* data */, DcSctpSocketCallbacks& cb) {
return cb.OnConnectionRestarted(); return cb.OnConnectionRestarted();
}, },
absl::monostate{}); absl::monostate{});
@ -164,7 +164,7 @@ void CallbackDeferrer::OnBufferedAmountLow(StreamID stream_id) {
void CallbackDeferrer::OnTotalBufferedAmountLow() { void CallbackDeferrer::OnTotalBufferedAmountLow() {
RTC_DCHECK(prepared_); RTC_DCHECK(prepared_);
deferred_.emplace_back( deferred_.emplace_back(
+[](CallbackData data, DcSctpSocketCallbacks& cb) { +[](CallbackData /* data */, DcSctpSocketCallbacks& cb) {
return cb.OnTotalBufferedAmountLow(); return cb.OnTotalBufferedAmountLow();
}, },
absl::monostate{}); absl::monostate{});

View File

@ -1042,7 +1042,7 @@ void DcSctpSocket::ReportFailedToParseChunk(int chunk_type) {
callbacks_.OnError(ErrorKind::kParseFailed, sb.str()); callbacks_.OnError(ErrorKind::kParseFailed, sb.str());
} }
void DcSctpSocket::HandleData(const CommonHeader& header, void DcSctpSocket::HandleData(const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
std::optional<DataChunk> chunk = DataChunk::Parse(descriptor.data); std::optional<DataChunk> chunk = DataChunk::Parse(descriptor.data);
if (ValidateParseSuccess(chunk) && ValidateHasTCB()) { if (ValidateParseSuccess(chunk) && ValidateHasTCB()) {
@ -1050,7 +1050,7 @@ void DcSctpSocket::HandleData(const CommonHeader& header,
} }
} }
void DcSctpSocket::HandleIData(const CommonHeader& header, void DcSctpSocket::HandleIData(const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
std::optional<IDataChunk> chunk = IDataChunk::Parse(descriptor.data); std::optional<IDataChunk> chunk = IDataChunk::Parse(descriptor.data);
if (ValidateParseSuccess(chunk) && ValidateHasTCB()) { if (ValidateParseSuccess(chunk) && ValidateHasTCB()) {
@ -1117,7 +1117,7 @@ void DcSctpSocket::HandleDataCommon(AnyDataChunk& chunk) {
} }
} }
void DcSctpSocket::HandleInit(const CommonHeader& header, void DcSctpSocket::HandleInit(const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
std::optional<InitChunk> chunk = InitChunk::Parse(descriptor.data); std::optional<InitChunk> chunk = InitChunk::Parse(descriptor.data);
if (!ValidateParseSuccess(chunk)) { if (!ValidateParseSuccess(chunk)) {
@ -1247,7 +1247,7 @@ void DcSctpSocket::HandleInit(const CommonHeader& header,
} }
void DcSctpSocket::HandleInitAck( void DcSctpSocket::HandleInitAck(
const CommonHeader& header, const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
std::optional<InitAckChunk> chunk = InitAckChunk::Parse(descriptor.data); std::optional<InitAckChunk> chunk = InitAckChunk::Parse(descriptor.data);
if (!ValidateParseSuccess(chunk)) { if (!ValidateParseSuccess(chunk)) {
@ -1446,7 +1446,7 @@ bool DcSctpSocket::HandleCookieEchoWithTCB(const CommonHeader& header,
} }
void DcSctpSocket::HandleCookieAck( void DcSctpSocket::HandleCookieAck(
const CommonHeader& header, const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
std::optional<CookieAckChunk> chunk = CookieAckChunk::Parse(descriptor.data); std::optional<CookieAckChunk> chunk = CookieAckChunk::Parse(descriptor.data);
if (!ValidateParseSuccess(chunk)) { if (!ValidateParseSuccess(chunk)) {
@ -1477,7 +1477,7 @@ void DcSctpSocket::MaybeDeliverMessages() {
} }
} }
void DcSctpSocket::HandleSack(const CommonHeader& header, void DcSctpSocket::HandleSack(const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
std::optional<SackChunk> chunk = SackChunk::Parse(descriptor.data); std::optional<SackChunk> chunk = SackChunk::Parse(descriptor.data);
@ -1510,7 +1510,7 @@ void DcSctpSocket::HandleSack(const CommonHeader& header,
} }
void DcSctpSocket::HandleHeartbeatRequest( void DcSctpSocket::HandleHeartbeatRequest(
const CommonHeader& header, const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
std::optional<HeartbeatRequestChunk> chunk = std::optional<HeartbeatRequestChunk> chunk =
HeartbeatRequestChunk::Parse(descriptor.data); HeartbeatRequestChunk::Parse(descriptor.data);
@ -1521,7 +1521,7 @@ void DcSctpSocket::HandleHeartbeatRequest(
} }
void DcSctpSocket::HandleHeartbeatAck( void DcSctpSocket::HandleHeartbeatAck(
const CommonHeader& header, const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
std::optional<HeartbeatAckChunk> chunk = std::optional<HeartbeatAckChunk> chunk =
HeartbeatAckChunk::Parse(descriptor.data); HeartbeatAckChunk::Parse(descriptor.data);
@ -1531,7 +1531,7 @@ void DcSctpSocket::HandleHeartbeatAck(
} }
} }
void DcSctpSocket::HandleAbort(const CommonHeader& header, void DcSctpSocket::HandleAbort(const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
std::optional<AbortChunk> chunk = AbortChunk::Parse(descriptor.data); std::optional<AbortChunk> chunk = AbortChunk::Parse(descriptor.data);
if (ValidateParseSuccess(chunk)) { if (ValidateParseSuccess(chunk)) {
@ -1551,7 +1551,7 @@ void DcSctpSocket::HandleAbort(const CommonHeader& header,
} }
} }
void DcSctpSocket::HandleError(const CommonHeader& header, void DcSctpSocket::HandleError(const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
std::optional<ErrorChunk> chunk = ErrorChunk::Parse(descriptor.data); std::optional<ErrorChunk> chunk = ErrorChunk::Parse(descriptor.data);
if (ValidateParseSuccess(chunk)) { if (ValidateParseSuccess(chunk)) {
@ -1569,7 +1569,7 @@ void DcSctpSocket::HandleError(const CommonHeader& header,
} }
void DcSctpSocket::HandleReconfig( void DcSctpSocket::HandleReconfig(
const CommonHeader& header, const CommonHeader& /* header */,
const SctpPacket::ChunkDescriptor& descriptor) { const SctpPacket::ChunkDescriptor& descriptor) {
Timestamp now = callbacks_.Now(); Timestamp now = callbacks_.Now();
std::optional<ReConfigChunk> chunk = ReConfigChunk::Parse(descriptor.data); std::optional<ReConfigChunk> chunk = ReConfigChunk::Parse(descriptor.data);

View File

@ -216,18 +216,19 @@ class SctpActor : public DcSctpSocketCallbacks {
void OnConnectionRestarted() override {} void OnConnectionRestarted() override {}
void OnStreamsResetFailed(rtc::ArrayView<const StreamID> outgoing_streams, void OnStreamsResetFailed(
absl::string_view reason) override {} rtc::ArrayView<const StreamID> /* outgoing_streams */,
absl::string_view /* reason */) override {}
void OnStreamsResetPerformed( void OnStreamsResetPerformed(
rtc::ArrayView<const StreamID> outgoing_streams) override {} rtc::ArrayView<const StreamID> /* outgoing_streams */) override {}
void OnIncomingStreamsReset( void OnIncomingStreamsReset(
rtc::ArrayView<const StreamID> incoming_streams) override {} rtc::ArrayView<const StreamID> /* incoming_streams */) override {}
void NotifyOutgoingMessageBufferEmpty() override {} void NotifyOutgoingMessageBufferEmpty() override {}
void OnBufferedAmountLow(StreamID stream_id) override { void OnBufferedAmountLow(StreamID /* stream_id */) override {
if (mode_ == ActorMode::kThroughputSender) { if (mode_ == ActorMode::kThroughputSender) {
std::vector<uint8_t> payload(kHugePayloadSize); std::vector<uint8_t> payload(kHugePayloadSize);
sctp_socket_.Send(DcSctpMessage(kStreamId, kPpid, std::move(payload)), sctp_socket_.Send(DcSctpMessage(kStreamId, kPpid, std::move(payload)),

View File

@ -89,7 +89,7 @@ class MockDcSctpSocketCallbacks : public DcSctpSocketCallbacks {
(override)); (override));
std::unique_ptr<Timeout> CreateTimeout( std::unique_ptr<Timeout> CreateTimeout(
webrtc::TaskQueueBase::DelayPrecision precision) override { webrtc::TaskQueueBase::DelayPrecision /* precision */) override {
// The fake timeout manager does not implement |precision|. // The fake timeout manager does not implement |precision|.
return timeout_manager_.CreateTimeout(); return timeout_manager_.CreateTimeout();
} }

View File

@ -114,7 +114,7 @@ class StreamResetHandlerTest : public testing::Test {
kMyInitialTsn, kMyInitialTsn,
kArwnd, kArwnd,
producer_, producer_,
[](TimeDelta rtt) {}, [](TimeDelta /* rtt */) {},
[]() {}, []() {},
*t3_rtx_timer_, *t3_rtx_timer_,
DcSctpOptions())), DcSctpOptions())),
@ -202,8 +202,8 @@ class StreamResetHandlerTest : public testing::Test {
reasm_ = std::make_unique<ReassemblyQueue>("log: ", kArwnd); reasm_ = std::make_unique<ReassemblyQueue>("log: ", kArwnd);
reasm_->RestoreFromState(state); reasm_->RestoreFromState(state);
retransmission_queue_ = std::make_unique<RetransmissionQueue>( retransmission_queue_ = std::make_unique<RetransmissionQueue>(
"", &callbacks_, kMyInitialTsn, kArwnd, producer_, [](TimeDelta rtt) {}, "", &callbacks_, kMyInitialTsn, kArwnd, producer_,
[]() {}, *t3_rtx_timer_, DcSctpOptions(), [](TimeDelta /* rtt */) {}, []() {}, *t3_rtx_timer_, DcSctpOptions(),
/*supports_partial_reliability=*/true, /*supports_partial_reliability=*/true,
/*use_message_interleaving=*/false); /*use_message_interleaving=*/false);
retransmission_queue_->RestoreFromState(state); retransmission_queue_->RestoreFromState(state);

View File

@ -79,7 +79,7 @@ class FakeTimeoutManager {
return timer; return timer;
} }
std::unique_ptr<FakeTimeout> CreateTimeout( std::unique_ptr<FakeTimeout> CreateTimeout(
webrtc::TaskQueueBase::DelayPrecision precision) { webrtc::TaskQueueBase::DelayPrecision /* precision */) {
// FakeTimeout does not support implement |precision|. // FakeTimeout does not support implement |precision|.
return CreateTimeout(); return CreateTimeout();
} }

View File

@ -129,7 +129,7 @@ TEST(TaskQueueTimeoutWithMockTaskQueueTest, CanSetTimeoutPrecisionToLow) {
_)); _));
TaskQueueTimeoutFactory factory( TaskQueueTimeoutFactory factory(
mock_task_queue, []() { return TimeMs(1337); }, mock_task_queue, []() { return TimeMs(1337); },
[](TimeoutID timeout_id) {}); [](TimeoutID /* timeout_id */) {});
std::unique_ptr<Timeout> timeout = std::unique_ptr<Timeout> timeout =
factory.CreateTimeout(webrtc::TaskQueueBase::DelayPrecision::kLow); factory.CreateTimeout(webrtc::TaskQueueBase::DelayPrecision::kLow);
timeout->Start(DurationMs(1), TimeoutID(1)); timeout->Start(DurationMs(1), TimeoutID(1));
@ -147,7 +147,7 @@ TEST(TaskQueueTimeoutWithMockTaskQueueTest, CanSetTimeoutPrecisionToHigh) {
_)); _));
TaskQueueTimeoutFactory factory( TaskQueueTimeoutFactory factory(
mock_task_queue, []() { return TimeMs(1337); }, mock_task_queue, []() { return TimeMs(1337); },
[](TimeoutID timeout_id) {}); [](TimeoutID /* timeout_id */) {});
std::unique_ptr<Timeout> timeout = std::unique_ptr<Timeout> timeout =
factory.CreateTimeout(webrtc::TaskQueueBase::DelayPrecision::kHigh); factory.CreateTimeout(webrtc::TaskQueueBase::DelayPrecision::kHigh);
timeout->Start(DurationMs(1), TimeoutID(1)); timeout->Start(DurationMs(1), TimeoutID(1));
@ -165,7 +165,7 @@ TEST(TaskQueueTimeoutWithMockTaskQueueTest, TimeoutPrecisionIsLowByDefault) {
_)); _));
TaskQueueTimeoutFactory factory( TaskQueueTimeoutFactory factory(
mock_task_queue, []() { return TimeMs(1337); }, mock_task_queue, []() { return TimeMs(1337); },
[](TimeoutID timeout_id) {}); [](TimeoutID /* timeout_id */) {});
std::unique_ptr<Timeout> timeout = factory.CreateTimeout(); std::unique_ptr<Timeout> timeout = factory.CreateTimeout();
timeout->Start(DurationMs(1), TimeoutID(1)); timeout->Start(DurationMs(1), TimeoutID(1));
} }

View File

@ -25,7 +25,7 @@ class MockSendQueue : public SendQueue {
public: public:
MockSendQueue() { MockSendQueue() {
ON_CALL(*this, Produce) ON_CALL(*this, Produce)
.WillByDefault([](webrtc::Timestamp now, size_t max_size) { .WillByDefault([](webrtc::Timestamp /* now */, size_t /* max_size */) {
return std::nullopt; return std::nullopt;
}); });
} }

View File

@ -164,7 +164,8 @@ void RetransmissionQueue::HandleIncreasedCumulativeTsnAck(
} }
} }
void RetransmissionQueue::HandlePacketLoss(UnwrappedTSN highest_tsn_acked) { void RetransmissionQueue::HandlePacketLoss(
UnwrappedTSN /* highest_tsn_acked */) {
if (!is_in_fast_recovery()) { if (!is_in_fast_recovery()) {
// https://tools.ietf.org/html/rfc4960#section-7.2.4 // https://tools.ietf.org/html/rfc4960#section-7.2.4
// "If not in Fast Recovery, adjust the ssthresh and cwnd of the // "If not in Fast Recovery, adjust the ssthresh and cwnd of the

View File

@ -81,7 +81,7 @@ class RetransmissionQueueTest : public testing::Test {
std::function<SendQueue::DataToSend(Timestamp, size_t)> CreateChunk( std::function<SendQueue::DataToSend(Timestamp, size_t)> CreateChunk(
OutgoingMessageId message_id) { OutgoingMessageId message_id) {
return [this, message_id](Timestamp now, size_t max_size) { return [this, message_id](Timestamp /* now */, size_t /* max_size */) {
return SendQueue::DataToSend(message_id, return SendQueue::DataToSend(message_id,
gen_.Ordered({1, 2, 3, 4}, "BE")); gen_.Ordered({1, 2, 3, 4}, "BE"));
}; };

View File

@ -45,7 +45,8 @@ CreateChunk(OutgoingMessageId message_id,
StreamID sid, StreamID sid,
MID mid, MID mid,
size_t payload_size = kPayloadSize) { size_t payload_size = kPayloadSize) {
return [sid, mid, payload_size, message_id](Timestamp now, size_t max_size) { return [sid, mid, payload_size, message_id](Timestamp /* now */,
size_t /* max_size */) {
return SendQueue::DataToSend( return SendQueue::DataToSend(
message_id, message_id,
Data(sid, SSN(0), mid, FSN(0), PPID(42), Data(sid, SSN(0), mid, FSN(0), PPID(42),

View File

@ -132,7 +132,7 @@ size_t AsyncStunTCPSocket::ProcessInput(rtc::ArrayView<const uint8_t> data) {
} }
size_t AsyncStunTCPSocket::GetExpectedLength(const void* data, size_t AsyncStunTCPSocket::GetExpectedLength(const void* data,
size_t len, size_t /* len */,
int* pad_bytes) { int* pad_bytes) {
*pad_bytes = 0; *pad_bytes = 0;
PacketLength pkt_len = PacketLength pkt_len =

View File

@ -100,15 +100,15 @@ class AsyncStunTCPSocketTest : public ::testing::Test,
vss_->ProcessMessagesUntilIdle(); vss_->ProcessMessagesUntilIdle();
} }
void OnReadPacket(rtc::AsyncPacketSocket* socket, void OnReadPacket(rtc::AsyncPacketSocket* /* socket */,
const rtc::ReceivedPacket& packet) { const rtc::ReceivedPacket& packet) {
recv_packets_.push_back( recv_packets_.push_back(
std::string(reinterpret_cast<const char*>(packet.payload().data()), std::string(reinterpret_cast<const char*>(packet.payload().data()),
packet.payload().size())); packet.payload().size()));
} }
void OnSentPacket(rtc::AsyncPacketSocket* socket, void OnSentPacket(rtc::AsyncPacketSocket* /* socket */,
const rtc::SentPacket& packet) { const rtc::SentPacket& /* packet */) {
++sent_packets_; ++sent_packets_;
} }
@ -172,7 +172,8 @@ TEST_F(AsyncStunTCPSocketTest, TestMultipleStunPackets) {
TEST_F(AsyncStunTCPSocketTest, ProcessInputHandlesMultiplePackets) { TEST_F(AsyncStunTCPSocketTest, ProcessInputHandlesMultiplePackets) {
send_socket_->RegisterReceivedPacketCallback( send_socket_->RegisterReceivedPacketCallback(
[&](rtc::AsyncPacketSocket* socket, const rtc::ReceivedPacket& packet) { [&](rtc::AsyncPacketSocket* /* socket */,
const rtc::ReceivedPacket& packet) {
recv_packets_.push_back( recv_packets_.push_back(
std::string(reinterpret_cast<const char*>(packet.payload().data()), std::string(reinterpret_cast<const char*>(packet.payload().data()),
packet.payload().size())); packet.payload().size()));

View File

@ -415,7 +415,7 @@ BasicIceController::GetBestWritableConnectionPerNetwork() const {
IceControllerInterface::SwitchResult IceControllerInterface::SwitchResult
BasicIceController::HandleInitialSelectDampening( BasicIceController::HandleInitialSelectDampening(
IceSwitchReason reason, IceSwitchReason /* reason */,
const Connection* new_connection) { const Connection* new_connection) {
if (!field_trials_->initial_select_dampening.has_value() && if (!field_trials_->initial_select_dampening.has_value() &&
!field_trials_->initial_select_dampening_ping_received.has_value()) { !field_trials_->initial_select_dampening_ping_received.has_value()) {
@ -732,7 +732,7 @@ int BasicIceController::CompareConnections(
int BasicIceController::CompareCandidatePairNetworks( int BasicIceController::CompareCandidatePairNetworks(
const Connection* a, const Connection* a,
const Connection* b, const Connection* b,
std::optional<rtc::AdapterType> network_preference) const { std::optional<rtc::AdapterType> /* network_preference */) const {
int compare_a_b_by_network_preference = int compare_a_b_by_network_preference =
CompareCandidatePairsByNetworkPreference(a, b, CompareCandidatePairsByNetworkPreference(a, b,
config_.network_preference); config_.network_preference);

View File

@ -1155,7 +1155,7 @@ int64_t Connection::last_data_received() const {
void Connection::ReceivedPingResponse( void Connection::ReceivedPingResponse(
int rtt, int rtt,
absl::string_view request_id, absl::string_view /* request_id */,
const std::optional<uint32_t>& nomination) { const std::optional<uint32_t>& nomination) {
RTC_DCHECK_RUN_ON(network_thread_); RTC_DCHECK_RUN_ON(network_thread_);
RTC_DCHECK_GE(rtt, 0); RTC_DCHECK_GE(rtt, 0);

View File

@ -78,7 +78,7 @@ StreamInterfaceChannel::StreamInterfaceChannel(
rtc::StreamResult StreamInterfaceChannel::Read(rtc::ArrayView<uint8_t> buffer, rtc::StreamResult StreamInterfaceChannel::Read(rtc::ArrayView<uint8_t> buffer,
size_t& read, size_t& read,
int& error) { int& /* error */) {
RTC_DCHECK_RUN_ON(&callback_sequence_); RTC_DCHECK_RUN_ON(&callback_sequence_);
if (state_ == rtc::SS_CLOSED) if (state_ == rtc::SS_CLOSED)
@ -96,7 +96,7 @@ rtc::StreamResult StreamInterfaceChannel::Read(rtc::ArrayView<uint8_t> buffer,
rtc::StreamResult StreamInterfaceChannel::Write( rtc::StreamResult StreamInterfaceChannel::Write(
rtc::ArrayView<const uint8_t> data, rtc::ArrayView<const uint8_t> data,
size_t& written, size_t& written,
int& error) { int& /* error */) {
RTC_DCHECK_RUN_ON(&callback_sequence_); RTC_DCHECK_RUN_ON(&callback_sequence_);
// Always succeeds, since this is an unreliable transport anyway. // Always succeeds, since this is an unreliable transport anyway.
// TODO(zhihuang): Should this block if ice_transport_'s temporarily // TODO(zhihuang): Should this block if ice_transport_'s temporarily
@ -685,13 +685,14 @@ void DtlsTransport::OnReadPacket(rtc::PacketTransportInternal* transport,
} }
} }
void DtlsTransport::OnSentPacket(rtc::PacketTransportInternal* transport, void DtlsTransport::OnSentPacket(rtc::PacketTransportInternal* /* transport */,
const rtc::SentPacket& sent_packet) { const rtc::SentPacket& sent_packet) {
RTC_DCHECK_RUN_ON(&thread_checker_); RTC_DCHECK_RUN_ON(&thread_checker_);
SignalSentPacket(this, sent_packet); SignalSentPacket(this, sent_packet);
} }
void DtlsTransport::OnReadyToSend(rtc::PacketTransportInternal* transport) { void DtlsTransport::OnReadyToSend(
rtc::PacketTransportInternal* /* transport */) {
RTC_DCHECK_RUN_ON(&thread_checker_); RTC_DCHECK_RUN_ON(&thread_checker_);
if (writable()) { if (writable()) {
SignalReadyToSend(this); SignalReadyToSend(this);

View File

@ -106,7 +106,7 @@ class DtlsTransportInternal : public rtc::PacketTransportInternal {
std::optional<rtc::SSLRole> role) = 0; std::optional<rtc::SSLRole> role) = 0;
ABSL_DEPRECATED("Set the max version via construction.") ABSL_DEPRECATED("Set the max version via construction.")
bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion version) { bool SetSslMaxProtocolVersion(rtc::SSLProtocolVersion /* version */) {
return true; return true;
} }

View File

@ -250,7 +250,7 @@ class DtlsTestClient : public sigslot::has_slots<> {
<< "' is writable"; << "' is writable";
} }
void OnTransportReadPacket(rtc::PacketTransportInternal* transport, void OnTransportReadPacket(rtc::PacketTransportInternal* /* transport */,
const rtc::ReceivedPacket& packet) { const rtc::ReceivedPacket& packet) {
uint32_t packet_num = 0; uint32_t packet_num = 0;
ASSERT_TRUE(VerifyPacket(packet.payload(), &packet_num)); ASSERT_TRUE(VerifyPacket(packet.payload(), &packet_num));
@ -268,7 +268,7 @@ class DtlsTestClient : public sigslot::has_slots<> {
} }
} }
void OnTransportSentPacket(rtc::PacketTransportInternal* transport, void OnTransportSentPacket(rtc::PacketTransportInternal* /* transport */,
const rtc::SentPacket& sent_packet) { const rtc::SentPacket& sent_packet) {
sent_packet_ = sent_packet; sent_packet_ = sent_packet;
} }
@ -276,8 +276,9 @@ class DtlsTestClient : public sigslot::has_slots<> {
rtc::SentPacket sent_packet() const { return sent_packet_; } rtc::SentPacket sent_packet() const { return sent_packet_; }
// Hook into the raw packet stream to make sure DTLS packets are encrypted. // Hook into the raw packet stream to make sure DTLS packets are encrypted.
void OnFakeIceTransportReadPacket(rtc::PacketTransportInternal* transport, void OnFakeIceTransportReadPacket(
const rtc::ReceivedPacket& packet) { rtc::PacketTransportInternal* /* transport */,
const rtc::ReceivedPacket& packet) {
// Packets should not be decrypted on the underlying Transport packets. // Packets should not be decrypted on the underlying Transport packets.
ASSERT_EQ(packet.decryption_info(), rtc::ReceivedPacket::kNotDecrypted); ASSERT_EQ(packet.decryption_info(), rtc::ReceivedPacket::kNotDecrypted);

View File

@ -271,7 +271,7 @@ class FakeDtlsTransport : public DtlsTransportInternal {
} }
private: private:
void OnIceTransportReadPacket(PacketTransportInternal* ice_, void OnIceTransportReadPacket(PacketTransportInternal* /* ice_ */,
const rtc::ReceivedPacket& packet) { const rtc::ReceivedPacket& packet) {
NotifyPacketReceived(packet); NotifyPacketReceived(packet);
} }

View File

@ -312,7 +312,7 @@ class FakeIceTransport : public IceTransportInternal {
int SendPacket(const char* data, int SendPacket(const char* data,
size_t len, size_t len,
const rtc::PacketOptions& options, const rtc::PacketOptions& options,
int flags) override { int /* flags */) override {
RTC_DCHECK_RUN_ON(network_thread_); RTC_DCHECK_RUN_ON(network_thread_);
if (!dest_) { if (!dest_) {
return -1; return -1;

View File

@ -60,7 +60,7 @@ class FakePacketTransport : public PacketTransportInternal {
int SendPacket(const char* data, int SendPacket(const char* data,
size_t len, size_t len,
const PacketOptions& options, const PacketOptions& options,
int flags) override { int /* flags */) override {
if (!dest_ || error_ != 0) { if (!dest_ || error_ != 0) {
return -1; return -1;
} }

View File

@ -203,7 +203,7 @@ class FakePortAllocatorSession : public PortAllocatorSession {
allocation_done_ = true; allocation_done_ = true;
SignalCandidatesAllocationDone(this); SignalCandidatesAllocationDone(this);
} }
void OnPortDestroyed(cricket::PortInterface* port) { void OnPortDestroyed(cricket::PortInterface* /* port */) {
// Don't want to double-delete port if it deletes itself. // Don't want to double-delete port if it deletes itself.
port_.release(); port_.release();
} }
@ -242,7 +242,7 @@ class FakePortAllocator : public cricket::PortAllocator {
std::move(factory), std::move(factory),
field_trials) {} field_trials) {}
void SetNetworkIgnoreMask(int network_ignore_mask) override {} void SetNetworkIgnoreMask(int /* network_ignore_mask */) override {}
cricket::PortAllocatorSession* CreateSessionInternal( cricket::PortAllocatorSession* CreateSessionInternal(
absl::string_view content_name, absl::string_view content_name,

View File

@ -257,7 +257,9 @@ class RTC_EXPORT IceTransportInternal : public rtc::PacketTransportInternal {
// Default implementation in order to allow downstream usage deletion. // Default implementation in order to allow downstream usage deletion.
// TODO: bugs.webrtc.org/42224914 - Remove when all downstream overrides are // TODO: bugs.webrtc.org/42224914 - Remove when all downstream overrides are
// gone. // gone.
virtual void SetIceTiebreaker(uint64_t tiebreaker) { RTC_CHECK_NOTREACHED(); } virtual void SetIceTiebreaker(uint64_t /* tiebreaker */) {
RTC_CHECK_NOTREACHED();
}
virtual void SetIceCredentials(absl::string_view ice_ufrag, virtual void SetIceCredentials(absl::string_view ice_ufrag,
absl::string_view ice_pwd); absl::string_view ice_pwd);

View File

@ -22,7 +22,7 @@ namespace cricket {
class MockActiveIceController : public cricket::ActiveIceControllerInterface { class MockActiveIceController : public cricket::ActiveIceControllerInterface {
public: public:
explicit MockActiveIceController( explicit MockActiveIceController(
const cricket::ActiveIceControllerFactoryArgs& args) {} const cricket::ActiveIceControllerFactoryArgs& /* args */) {}
~MockActiveIceController() override = default; ~MockActiveIceController() override = default;
MOCK_METHOD(void, SetIceConfig, (const cricket::IceConfig&), (override)); MOCK_METHOD(void, SetIceConfig, (const cricket::IceConfig&), (override));

View File

@ -22,7 +22,8 @@ namespace cricket {
class MockIceController : public cricket::IceControllerInterface { class MockIceController : public cricket::IceControllerInterface {
public: public:
explicit MockIceController(const cricket::IceControllerFactoryArgs& args) {} explicit MockIceController(
const cricket::IceControllerFactoryArgs& /* args */) {}
~MockIceController() override = default; ~MockIceController() override = default;
MOCK_METHOD(void, SetIceConfig, (const cricket::IceConfig&), (override)); MOCK_METHOD(void, SetIceConfig, (const cricket::IceConfig&), (override));

View File

@ -56,21 +56,21 @@ class MockIceTransport : public IceTransportInternal {
const std::string& transport_name() const override { return transport_name_; } const std::string& transport_name() const override { return transport_name_; }
int component() const override { return 0; } int component() const override { return 0; }
void SetIceRole(IceRole role) override {} void SetIceRole(IceRole /* role */) override {}
// The ufrag and pwd in `ice_params` must be set // The ufrag and pwd in `ice_params` must be set
// before candidate gathering can start. // before candidate gathering can start.
void SetIceParameters(const IceParameters& ice_params) override {} void SetIceParameters(const IceParameters& /* ice_params */) override {}
void SetRemoteIceParameters(const IceParameters& ice_params) override {} void SetRemoteIceParameters(const IceParameters& /* ice_params */) override {}
void SetRemoteIceMode(IceMode mode) override {} void SetRemoteIceMode(IceMode /* mode */) override {}
void SetIceConfig(const IceConfig& config) override {} void SetIceConfig(const IceConfig& /* config */) override {}
std::optional<int> GetRttEstimate() override { return std::nullopt; } std::optional<int> GetRttEstimate() override { return std::nullopt; }
const Connection* selected_connection() const override { return nullptr; } const Connection* selected_connection() const override { return nullptr; }
std::optional<const CandidatePair> GetSelectedCandidatePair() const override { std::optional<const CandidatePair> GetSelectedCandidatePair() const override {
return std::nullopt; return std::nullopt;
} }
void MaybeStartGathering() override {} void MaybeStartGathering() override {}
void AddRemoteCandidate(const Candidate& candidate) override {} void AddRemoteCandidate(const Candidate& /* candidate */) override {}
void RemoveRemoteCandidate(const Candidate& candidate) override {} void RemoveRemoteCandidate(const Candidate& /* candidate */) override {}
void RemoveAllRemoteCandidates() override {} void RemoveAllRemoteCandidates() override {}
IceGatheringState gathering_state() const override { IceGatheringState gathering_state() const override {
return IceGatheringState::kIceGatheringComplete; return IceGatheringState::kIceGatheringComplete;

View File

@ -900,7 +900,7 @@ void P2PTransportChannel::MaybeStartGathering() {
} }
// A new port is available, attempt to make connections for it // A new port is available, attempt to make connections for it
void P2PTransportChannel::OnPortReady(PortAllocatorSession* session, void P2PTransportChannel::OnPortReady(PortAllocatorSession* /* session */,
PortInterface* port) { PortInterface* port) {
RTC_DCHECK_RUN_ON(network_thread_); RTC_DCHECK_RUN_ON(network_thread_);
@ -946,7 +946,7 @@ void P2PTransportChannel::OnPortReady(PortAllocatorSession* session,
// A new candidate is available, let listeners know // A new candidate is available, let listeners know
void P2PTransportChannel::OnCandidatesReady( void P2PTransportChannel::OnCandidatesReady(
PortAllocatorSession* session, PortAllocatorSession* /* session */,
const std::vector<Candidate>& candidates) { const std::vector<Candidate>& candidates) {
RTC_DCHECK_RUN_ON(network_thread_); RTC_DCHECK_RUN_ON(network_thread_);
for (size_t i = 0; i < candidates.size(); ++i) { for (size_t i = 0; i < candidates.size(); ++i) {
@ -955,7 +955,7 @@ void P2PTransportChannel::OnCandidatesReady(
} }
void P2PTransportChannel::OnCandidateError( void P2PTransportChannel::OnCandidateError(
PortAllocatorSession* session, PortAllocatorSession* /* session */,
const IceCandidateErrorEvent& event) { const IceCandidateErrorEvent& event) {
RTC_DCHECK(network_thread_ == rtc::Thread::Current()); RTC_DCHECK(network_thread_ == rtc::Thread::Current());
if (candidate_error_callback_) { if (candidate_error_callback_) {
@ -964,7 +964,7 @@ void P2PTransportChannel::OnCandidateError(
} }
void P2PTransportChannel::OnCandidatesAllocationDone( void P2PTransportChannel::OnCandidatesAllocationDone(
PortAllocatorSession* session) { PortAllocatorSession* /* session */) {
RTC_DCHECK_RUN_ON(network_thread_); RTC_DCHECK_RUN_ON(network_thread_);
if (config_.gather_continually()) { if (config_.gather_continually()) {
RTC_LOG(LS_INFO) << "P2PTransportChannel: " << transport_name() RTC_LOG(LS_INFO) << "P2PTransportChannel: " << transport_name()
@ -1136,7 +1136,7 @@ void P2PTransportChannel::OnCandidateFilterChanged(uint32_t prev_filter,
} }
} }
void P2PTransportChannel::OnRoleConflict(PortInterface* port) { void P2PTransportChannel::OnRoleConflict(PortInterface* /* port */) {
SignalRoleConflict(this); // STUN ping will be sent when SetRole is called SignalRoleConflict(this); // STUN ping will be sent when SetRole is called
// from Transport. // from Transport.
} }
@ -2138,7 +2138,7 @@ void P2PTransportChannel::OnPortDestroyed(PortInterface* port) {
} }
void P2PTransportChannel::OnPortsPruned( void P2PTransportChannel::OnPortsPruned(
PortAllocatorSession* session, PortAllocatorSession* /* session */,
const std::vector<PortInterface*>& ports) { const std::vector<PortInterface*>& ports) {
RTC_DCHECK_RUN_ON(network_thread_); RTC_DCHECK_RUN_ON(network_thread_);
for (PortInterface* port : ports) { for (PortInterface* port : ports) {

View File

@ -194,7 +194,7 @@ class ResolverFactoryFixture : public webrtc::MockAsyncDnsResolverFactory {
mock_async_dns_resolver_ = std::make_unique<webrtc::MockAsyncDnsResolver>(); mock_async_dns_resolver_ = std::make_unique<webrtc::MockAsyncDnsResolver>();
EXPECT_CALL(*mock_async_dns_resolver_, Start(_, _)) EXPECT_CALL(*mock_async_dns_resolver_, Start(_, _))
.WillRepeatedly( .WillRepeatedly(
[](const rtc::SocketAddress& addr, [](const rtc::SocketAddress& /* addr */,
absl::AnyInvocable<void()> callback) { callback(); }); absl::AnyInvocable<void()> callback) { callback(); });
EXPECT_CALL(*mock_async_dns_resolver_, result()) EXPECT_CALL(*mock_async_dns_resolver_, result())
.WillOnce(ReturnRef(mock_async_dns_resolver_result_)); .WillOnce(ReturnRef(mock_async_dns_resolver_result_));

View File

@ -19,7 +19,8 @@ PacketTransportInternal::PacketTransportInternal() = default;
PacketTransportInternal::~PacketTransportInternal() = default; PacketTransportInternal::~PacketTransportInternal() = default;
bool PacketTransportInternal::GetOption(rtc::Socket::Option opt, int* value) { bool PacketTransportInternal::GetOption(rtc::Socket::Option /* opt */,
int* /* value */) {
return false; return false;
} }

View File

@ -683,8 +683,8 @@ std::string Port::CreateStunUsername(absl::string_view remote_username) const {
return std::string(remote_username) + ":" + username_fragment(); return std::string(remote_username) + ":" + username_fragment();
} }
bool Port::HandleIncomingPacket(rtc::AsyncPacketSocket* socket, bool Port::HandleIncomingPacket(rtc::AsyncPacketSocket* /* socket */,
const rtc::ReceivedPacket& packet) { const rtc::ReceivedPacket& /* packet */) {
RTC_DCHECK_NOTREACHED(); RTC_DCHECK_NOTREACHED();
return false; return false;
} }

View File

@ -363,7 +363,7 @@ class RTC_EXPORT Port : public PortInterface, public sigslot::has_slots<> {
int16_t network_cost() const override { return network_cost_; } int16_t network_cost() const override { return network_cost_; }
void GetStunStats(std::optional<StunStats>* stats) override {} void GetStunStats(std::optional<StunStats>* /* stats */) override {}
protected: protected:
void UpdateNetworkCost() override; void UpdateNetworkCost() override;
@ -427,7 +427,7 @@ class RTC_EXPORT Port : public PortInterface, public sigslot::has_slots<> {
rtc::DiffServCodePoint StunDscpValue() const override; rtc::DiffServCodePoint StunDscpValue() const override;
// Extra work to be done in subclasses when a connection is destroyed. // Extra work to be done in subclasses when a connection is destroyed.
virtual void HandleConnectionDestroyed(Connection* conn) {} virtual void HandleConnectionDestroyed(Connection* /* conn */) {}
void DestroyAllConnections(); void DestroyAllConnections();

View File

@ -248,13 +248,13 @@ class RTC_EXPORT PortAllocatorSession : public sigslot::has_slots<> {
// Get candidate-level stats from all candidates on the ready ports and return // Get candidate-level stats from all candidates on the ready ports and return
// the stats to the given list. // the stats to the given list.
virtual void GetCandidateStatsFromReadyPorts( virtual void GetCandidateStatsFromReadyPorts(
CandidateStatsList* candidate_stats_list) const {} CandidateStatsList* /* candidate_stats_list */) const {}
// Set the interval at which STUN candidates will resend STUN binding requests // Set the interval at which STUN candidates will resend STUN binding requests
// on the underlying ports to keep NAT bindings open. // on the underlying ports to keep NAT bindings open.
// The default value of the interval in implementation is restored if a null // The default value of the interval in implementation is restored if a null
// optional value is passed. // optional value is passed.
virtual void SetStunKeepaliveIntervalForReadyPorts( virtual void SetStunKeepaliveIntervalForReadyPorts(
const std::optional<int>& stun_keepalive_interval) {} const std::optional<int>& /* stun_keepalive_interval */) {}
// Another way of getting the information provided by the signals below. // Another way of getting the information provided by the signals below.
// //
// Ports and candidates are not guaranteed to be in the same order as the // Ports and candidates are not guaranteed to be in the same order as the
@ -413,7 +413,8 @@ class RTC_EXPORT PortAllocator : public sigslot::has_slots<> {
// Set list of <ipaddress, mask> that shall be categorized as VPN. // Set list of <ipaddress, mask> that shall be categorized as VPN.
// Implemented by BasicPortAllocator. // Implemented by BasicPortAllocator.
virtual void SetVpnList(const std::vector<rtc::NetworkMask>& vpn_list) {} virtual void SetVpnList(const std::vector<rtc::NetworkMask>& /* vpn_list */) {
}
std::unique_ptr<PortAllocatorSession> CreateSession( std::unique_ptr<PortAllocatorSession> CreateSession(
absl::string_view content_name, absl::string_view content_name,

View File

@ -173,7 +173,7 @@ class TestPort : public Port {
ICE_TYPE_PREFERENCE_HOST, 0, "", true); ICE_TYPE_PREFERENCE_HOST, 0, "", true);
} }
virtual bool SupportsProtocol(absl::string_view protocol) const { virtual bool SupportsProtocol(absl::string_view /* protocol */) const {
return true; return true;
} }
@ -194,7 +194,7 @@ class TestPort : public Port {
} }
virtual Connection* CreateConnection(const Candidate& remote_candidate, virtual Connection* CreateConnection(const Candidate& remote_candidate,
CandidateOrigin origin) { CandidateOrigin /* origin */) {
Connection* conn = new ProxyConnection(NewWeakPtr(), 0, remote_candidate); Connection* conn = new ProxyConnection(NewWeakPtr(), 0, remote_candidate);
AddOrReplaceConnection(conn); AddOrReplaceConnection(conn);
// Set use-candidate attribute flag as this will add USE-CANDIDATE attribute // Set use-candidate attribute flag as this will add USE-CANDIDATE attribute
@ -204,8 +204,8 @@ class TestPort : public Port {
} }
virtual int SendTo(const void* data, virtual int SendTo(const void* data,
size_t size, size_t size,
const rtc::SocketAddress& addr, const rtc::SocketAddress& /* addr */,
const rtc::PacketOptions& options, const rtc::PacketOptions& /* options */,
bool payload) { bool payload) {
if (!payload) { if (!payload) {
auto msg = std::make_unique<IceMessage>(); auto msg = std::make_unique<IceMessage>();
@ -220,7 +220,9 @@ class TestPort : public Port {
} }
return static_cast<int>(size); return static_cast<int>(size);
} }
virtual int SetOption(rtc::Socket::Option opt, int value) { return 0; } virtual int SetOption(rtc::Socket::Option /* opt */, int /* value */) {
return 0;
}
virtual int GetOption(rtc::Socket::Option opt, int* value) { return -1; } virtual int GetOption(rtc::Socket::Option opt, int* value) { return -1; }
virtual int GetError() { return 0; } virtual int GetError() { return 0; }
void Reset() { void Reset() {

View File

@ -518,9 +518,9 @@ class PseudoTcpTestReceiveWindow : public PseudoTcpTestBase {
private: private:
// IPseudoTcpNotify interface // IPseudoTcpNotify interface
virtual void OnTcpReadable(PseudoTcp* tcp) {} virtual void OnTcpReadable(PseudoTcp* /* tcp */) {}
virtual void OnTcpWriteable(PseudoTcp* tcp) {} virtual void OnTcpWriteable(PseudoTcp* /* tcp */) {}
void ReadUntilIOPending() { void ReadUntilIOPending() {
char block[kBlockSize]; char block[kBlockSize];

View File

@ -95,7 +95,7 @@ class RegatheringControllerTest : public ::testing::Test,
allocator_session_->ClearGettingPorts(); allocator_session_->ClearGettingPorts();
} }
void OnIceRegathering(cricket::PortAllocatorSession* allocator_session, void OnIceRegathering(cricket::PortAllocatorSession* /* allocator_session */,
cricket::IceRegatheringReason reason) { cricket::IceRegatheringReason reason) {
++count_[reason]; ++count_[reason];
} }

View File

@ -129,7 +129,7 @@ UDPPort::AddressResolver::AddressResolver(
void UDPPort::AddressResolver::Resolve( void UDPPort::AddressResolver::Resolve(
const rtc::SocketAddress& address, const rtc::SocketAddress& address,
int family, int family,
const webrtc::FieldTrialsView& field_trials) { const webrtc::FieldTrialsView& /* field_trials */) {
if (resolvers_.find(address) != resolvers_.end()) if (resolvers_.find(address) != resolvers_.end())
return; return;
@ -240,7 +240,7 @@ void UDPPort::MaybePrepareStunCandidate() {
} }
Connection* UDPPort::CreateConnection(const Candidate& address, Connection* UDPPort::CreateConnection(const Candidate& address,
CandidateOrigin origin) { CandidateOrigin /* origin */) {
if (!SupportsProtocol(address.protocol())) { if (!SupportsProtocol(address.protocol())) {
return nullptr; return nullptr;
} }
@ -281,7 +281,7 @@ int UDPPort::SendTo(const void* data,
size_t size, size_t size,
const rtc::SocketAddress& addr, const rtc::SocketAddress& addr,
const rtc::PacketOptions& options, const rtc::PacketOptions& options,
bool payload) { bool /* payload */) {
rtc::PacketOptions modified_options(options); rtc::PacketOptions modified_options(options);
CopyPortInformationToPacketInfo(&modified_options.info_signaled_after_sent); CopyPortInformationToPacketInfo(&modified_options.info_signaled_after_sent);
int sent = socket_->SendTo(data, size, addr, modified_options); int sent = socket_->SendTo(data, size, addr, modified_options);
@ -350,7 +350,7 @@ void UDPPort::set_stun_keepalive_delay(const std::optional<int>& delay) {
stun_keepalive_delay_ = delay.value_or(STUN_KEEPALIVE_INTERVAL); stun_keepalive_delay_ = delay.value_or(STUN_KEEPALIVE_INTERVAL);
} }
void UDPPort::OnLocalAddressReady(rtc::AsyncPacketSocket* socket, void UDPPort::OnLocalAddressReady(rtc::AsyncPacketSocket* /* socket */,
const rtc::SocketAddress& address) { const rtc::SocketAddress& address) {
// When adapter enumeration is disabled and binding to the any address, the // When adapter enumeration is disabled and binding to the any address, the
// default local address will be issued as a candidate instead if // default local address will be issued as a candidate instead if
@ -368,7 +368,7 @@ void UDPPort::OnLocalAddressReady(rtc::AsyncPacketSocket* socket,
MaybePrepareStunCandidate(); MaybePrepareStunCandidate();
} }
void UDPPort::PostAddAddress(bool is_final) { void UDPPort::PostAddAddress(bool /* is_final */) {
MaybeSetPortCompleteOrError(); MaybeSetPortCompleteOrError();
} }
@ -396,12 +396,12 @@ void UDPPort::OnReadPacket(rtc::AsyncPacketSocket* socket,
} }
} }
void UDPPort::OnSentPacket(rtc::AsyncPacketSocket* socket, void UDPPort::OnSentPacket(rtc::AsyncPacketSocket* /* socket */,
const rtc::SentPacket& sent_packet) { const rtc::SentPacket& sent_packet) {
PortInterface::SignalSentPacket(sent_packet); PortInterface::SignalSentPacket(sent_packet);
} }
void UDPPort::OnReadyToSend(rtc::AsyncPacketSocket* socket) { void UDPPort::OnReadyToSend(rtc::AsyncPacketSocket* /* socket */) {
Port::OnReadyToSend(); Port::OnReadyToSend();
} }

View File

@ -216,16 +216,16 @@ class StunPortTestBase : public ::testing::Test, public sigslot::has_slots<> {
rtc::InitRandom(NULL, 0); rtc::InitRandom(NULL, 0);
} }
void OnPortComplete(cricket::Port* port) { void OnPortComplete(cricket::Port* /* port */) {
ASSERT_FALSE(done_); ASSERT_FALSE(done_);
done_ = true; done_ = true;
error_ = false; error_ = false;
} }
void OnPortError(cricket::Port* port) { void OnPortError(cricket::Port* /* port */) {
done_ = true; done_ = true;
error_ = true; error_ = true;
} }
void OnCandidateError(cricket::Port* port, void OnCandidateError(cricket::Port* /* port */,
const cricket::IceCandidateErrorEvent& event) { const cricket::IceCandidateErrorEvent& event) {
error_event_ = event; error_event_ = event;
} }
@ -344,7 +344,7 @@ TEST_F(StunPortWithMockDnsResolverTest, TestPrepareAddressHostname) {
[](webrtc::MockAsyncDnsResolver* resolver, [](webrtc::MockAsyncDnsResolver* resolver,
webrtc::MockAsyncDnsResolverResult* resolver_result) { webrtc::MockAsyncDnsResolverResult* resolver_result) {
EXPECT_CALL(*resolver, Start(kValidHostnameAddr, /*family=*/AF_INET, _)) EXPECT_CALL(*resolver, Start(kValidHostnameAddr, /*family=*/AF_INET, _))
.WillOnce([](const rtc::SocketAddress& addr, int family, .WillOnce([](const rtc::SocketAddress& /* addr */, int /* family */,
absl::AnyInvocable<void()> callback) { callback(); }); absl::AnyInvocable<void()> callback) { callback(); });
EXPECT_CALL(*resolver, result) EXPECT_CALL(*resolver, result)
@ -370,7 +370,7 @@ TEST_F(StunPortWithMockDnsResolverTest,
[](webrtc::MockAsyncDnsResolver* resolver, [](webrtc::MockAsyncDnsResolver* resolver,
webrtc::MockAsyncDnsResolverResult* resolver_result) { webrtc::MockAsyncDnsResolverResult* resolver_result) {
EXPECT_CALL(*resolver, Start(kValidHostnameAddr, /*family=*/AF_INET, _)) EXPECT_CALL(*resolver, Start(kValidHostnameAddr, /*family=*/AF_INET, _))
.WillOnce([](const rtc::SocketAddress& addr, int family, .WillOnce([](const rtc::SocketAddress& /* addr */, int /* family */,
absl::AnyInvocable<void()> callback) { callback(); }); absl::AnyInvocable<void()> callback) { callback(); });
EXPECT_CALL(*resolver, result) EXPECT_CALL(*resolver, result)
.WillRepeatedly(ReturnPointee(resolver_result)); .WillRepeatedly(ReturnPointee(resolver_result));