Skip to content

Commit

Permalink
Comment unused variables in implemented functions 13\n
Browse files Browse the repository at this point in the history
Increased the number of errors the automation is fixing to 150 from
75 in this commit.

Bug: webrtc:370878648
Change-Id: If6e6a5f40db7eb54c27c1a85fb7031838e478c70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366205
Reviewed-by: Harald Alvestrand <[email protected]>
Reviewed-by: Danil Chapovalov <[email protected]>
Commit-Queue: Dor Hen <[email protected]>
Cr-Commit-Position: refs/heads/main@{#43337}
  • Loading branch information
Dor Hen authored and WebRTC LUCI CQ committed Oct 31, 2024
1 parent 297fe1a commit 3fa21c8
Show file tree
Hide file tree
Showing 53 changed files with 389 additions and 351 deletions.
4 changes: 2 additions & 2 deletions audio/voip/test/audio_egress_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ TEST_F(AudioEgressTest, SkipAudioEncodingAfterStopSend) {
constexpr int kExpected = 10;
rtc::Event event;
int rtp_count = 0;
auto rtp_sent = [&](rtc::ArrayView<const uint8_t> packet, Unused) {
auto rtp_sent = [&](rtc::ArrayView<const uint8_t> /* packet */, Unused) {
if (++rtp_count == kExpected) {
event.Set();
}
Expand Down Expand Up @@ -296,7 +296,7 @@ TEST_F(AudioEgressTest, TestAudioInputLevelAndEnergyDuration) {
constexpr int kExpected = 6;
rtc::Event event;
int rtp_count = 0;
auto rtp_sent = [&](rtc::ArrayView<const uint8_t> packet, Unused) {
auto rtp_sent = [&](rtc::ArrayView<const uint8_t> /* packet */, Unused) {
if (++rtp_count == kExpected) {
event.Set();
}
Expand Down
73 changes: 38 additions & 35 deletions media/base/fake_media_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ FakeVoiceMediaSendChannel::VoiceChannelAudioSink::~VoiceChannelAudioSink() {
}
}
void FakeVoiceMediaSendChannel::VoiceChannelAudioSink::OnData(
const void* audio_data,
int bits_per_sample,
int sample_rate,
size_t number_of_channels,
size_t number_of_frames,
std::optional<int64_t> absolute_capture_timestamp_ms) {}
const void* /* audio_data */,
int /* bits_per_sample */,
int /* sample_rate */,
size_t /* number_of_channels */,
size_t /* number_of_frames */,
std::optional<int64_t> /* absolute_capture_timestamp_ms */) {}
void FakeVoiceMediaSendChannel::VoiceChannelAudioSink::OnClose() {
source_ = nullptr;
}
Expand Down Expand Up @@ -288,7 +288,7 @@ bool FakeVoiceMediaSendChannel::GetOutputVolume(uint32_t ssrc, double* volume) {
*volume = output_scalings_[ssrc];
return true;
}
bool FakeVoiceMediaSendChannel::GetStats(VoiceMediaSendInfo* info) {
bool FakeVoiceMediaSendChannel::GetStats(VoiceMediaSendInfo* /* info */) {
return false;
}
bool FakeVoiceMediaSendChannel::SetSendCodecs(
Expand Down Expand Up @@ -388,8 +388,8 @@ bool FakeVideoMediaSendChannel::HasSource(uint32_t ssrc) const {
return sources_.find(ssrc) != sources_.end() && sources_.at(ssrc) != nullptr;
}
void FakeVideoMediaSendChannel::FillBitrateInfo(
BandwidthEstimationInfo* bwe_info) {}
bool FakeVideoMediaSendChannel::GetStats(VideoMediaSendInfo* info) {
BandwidthEstimationInfo* /* bwe_info */) {}
bool FakeVideoMediaSendChannel::GetStats(VideoMediaSendInfo* /* info */) {
return false;
}
bool FakeVideoMediaSendChannel::SetSendCodecs(
Expand All @@ -412,8 +412,8 @@ bool FakeVideoMediaSendChannel::SetMaxSendBandwidth(int bps) {
return true;
}
void FakeVideoMediaSendChannel::GenerateSendKeyFrame(
uint32_t ssrc,
const std::vector<std::string>& rids) {}
uint32_t /* ssrc */,
const std::vector<std::string>& /* rids */) {}

FakeVideoMediaReceiveChannel::FakeVideoMediaReceiveChannel(
const VideoOptions& options,
Expand Down Expand Up @@ -457,7 +457,7 @@ bool FakeVideoMediaReceiveChannel::SetSink(
return true;
}
void FakeVideoMediaReceiveChannel::SetDefaultSink(
rtc::VideoSinkInterface<webrtc::VideoFrame>* sink) {}
rtc::VideoSinkInterface<webrtc::VideoFrame>* /* sink */) {}
bool FakeVideoMediaReceiveChannel::HasSink(uint32_t ssrc) const {
return sinks_.find(ssrc) != sinks_.end() && sinks_.at(ssrc) != nullptr;
}
Expand All @@ -481,7 +481,7 @@ bool FakeVideoMediaReceiveChannel::RemoveRecvStream(uint32_t ssrc) {
return true;
}
std::vector<webrtc::RtpSource> FakeVideoMediaReceiveChannel::GetSources(
uint32_t ssrc) const {
uint32_t /* ssrc */) const {
return {};
}
bool FakeVideoMediaReceiveChannel::SetBaseMinimumPlayoutDelayMs(uint32_t ssrc,
Expand Down Expand Up @@ -521,15 +521,16 @@ bool FakeVideoMediaReceiveChannel::SetMaxSendBandwidth(int bps) {
}

void FakeVideoMediaReceiveChannel::SetRecordableEncodedFrameCallback(
uint32_t ssrc,
std::function<void(const webrtc::RecordableEncodedFrame&)> callback) {}
uint32_t /* ssrc */,
std::function<void(const webrtc::RecordableEncodedFrame&)> /* callback */) {
}

void FakeVideoMediaReceiveChannel::ClearRecordableEncodedFrameCallback(
uint32_t ssrc) {}
uint32_t /* ssrc */) {}

void FakeVideoMediaReceiveChannel::RequestRecvKeyFrame(uint32_t ssrc) {}
void FakeVideoMediaReceiveChannel::RequestRecvKeyFrame(uint32_t /* ssrc */) {}

bool FakeVideoMediaReceiveChannel::GetStats(VideoMediaReceiveInfo* info) {
bool FakeVideoMediaReceiveChannel::GetStats(VideoMediaReceiveInfo* /* info */) {
return false;
}

Expand All @@ -543,11 +544,12 @@ rtc::scoped_refptr<webrtc::AudioState> FakeVoiceEngine::GetAudioState() const {
return rtc::scoped_refptr<webrtc::AudioState>();
}
std::unique_ptr<VoiceMediaSendChannelInterface>
FakeVoiceEngine::CreateSendChannel(webrtc::Call* call,
const MediaConfig& config,
const AudioOptions& options,
const webrtc::CryptoOptions& crypto_options,
webrtc::AudioCodecPairId codec_pair_id) {
FakeVoiceEngine::CreateSendChannel(
webrtc::Call* call,
const MediaConfig& /* config */,
const AudioOptions& options,
const webrtc::CryptoOptions& /* crypto_options */,
webrtc::AudioCodecPairId /* codec_pair_id */) {
std::unique_ptr<FakeVoiceMediaSendChannel> ch =
std::make_unique<FakeVoiceMediaSendChannel>(options,
call->network_thread());
Expand All @@ -556,10 +558,10 @@ FakeVoiceEngine::CreateSendChannel(webrtc::Call* call,
std::unique_ptr<VoiceMediaReceiveChannelInterface>
FakeVoiceEngine::CreateReceiveChannel(
webrtc::Call* call,
const MediaConfig& config,
const MediaConfig& /* config */,
const AudioOptions& options,
const webrtc::CryptoOptions& crypto_options,
webrtc::AudioCodecPairId codec_pair_id) {
const webrtc::CryptoOptions& /* crypto_options */,
webrtc::AudioCodecPairId /* codec_pair_id */) {
std::unique_ptr<FakeVoiceMediaReceiveChannel> ch =
std::make_unique<FakeVoiceMediaReceiveChannel>(options,
call->network_thread());
Expand All @@ -584,8 +586,8 @@ void FakeVoiceEngine::SetSendCodecs(const std::vector<Codec>& codecs) {
int FakeVoiceEngine::GetInputLevel() {
return 0;
}
bool FakeVoiceEngine::StartAecDump(webrtc::FileWrapper file,
int64_t max_size_bytes) {
bool FakeVoiceEngine::StartAecDump(webrtc::FileWrapper /* file */,
int64_t /* max_size_bytes */) {
return false;
}
std::optional<webrtc::AudioDeviceModule::Stats>
Expand Down Expand Up @@ -618,10 +620,11 @@ bool FakeVideoEngine::SetOptions(const VideoOptions& options) {
std::unique_ptr<VideoMediaSendChannelInterface>
FakeVideoEngine::CreateSendChannel(
webrtc::Call* call,
const MediaConfig& config,
const MediaConfig& /* config */,
const VideoOptions& options,
const webrtc::CryptoOptions& crypto_options,
webrtc::VideoBitrateAllocatorFactory* video_bitrate_allocator_factory) {
const webrtc::CryptoOptions& /* crypto_options */,
webrtc::
VideoBitrateAllocatorFactory* /* video_bitrate_allocator_factory */) {
if (fail_create_channel_) {
return nullptr;
}
Expand All @@ -634,9 +637,9 @@ FakeVideoEngine::CreateSendChannel(
std::unique_ptr<VideoMediaReceiveChannelInterface>
FakeVideoEngine::CreateReceiveChannel(
webrtc::Call* call,
const MediaConfig& config,
const MediaConfig& /* config */,
const VideoOptions& options,
const webrtc::CryptoOptions& crypto_options) {
const webrtc::CryptoOptions& /* crypto_options */) {
if (fail_create_channel_) {
return nullptr;
}
Expand All @@ -646,11 +649,11 @@ FakeVideoEngine::CreateReceiveChannel(
call->network_thread());
return ch;
}
std::vector<Codec> FakeVideoEngine::send_codecs(bool use_rtx) const {
std::vector<Codec> FakeVideoEngine::send_codecs(bool /* use_rtx */) const {
return send_codecs_;
}

std::vector<Codec> FakeVideoEngine::recv_codecs(bool use_rtx) const {
std::vector<Codec> FakeVideoEngine::recv_codecs(bool /* use_rtx */) const {
return recv_codecs_;
}

Expand Down
2 changes: 1 addition & 1 deletion media/engine/webrtc_video_engine_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4128,7 +4128,7 @@ class Vp9SettingsTestWithFieldTrial

void VerifySettings(int num_spatial_layers,
int num_temporal_layers,
webrtc::InterLayerPredMode interLayerPred) {
webrtc::InterLayerPredMode /* interLayerPred */) {
cricket::VideoSenderParameters parameters;
parameters.codecs.push_back(GetEngineCodec("VP9"));
ASSERT_TRUE(send_channel_->SetSenderParameters(parameters));
Expand Down
6 changes: 3 additions & 3 deletions media/engine/webrtc_voice_engine_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,11 @@ TEST(WebRtcVoiceEngineTestStubLibrary, StartupShutdown) {

class FakeAudioSink : public webrtc::AudioSinkInterface {
public:
void OnData(const Data& audio) override {}
void OnData(const Data& /* audio */) override {}
};

class FakeAudioSource : public cricket::AudioSource {
void SetSink(Sink* sink) override {}
void SetSink(Sink* /* sink */) override {}
};

class WebRtcVoiceEngineTestFake : public ::testing::TestWithParam<bool> {
Expand Down Expand Up @@ -714,7 +714,7 @@ class WebRtcVoiceEngineTestFake : public ::testing::TestWithParam<bool> {
}
}
void VerifyVoiceSenderInfo(const cricket::VoiceSenderInfo& info,
bool is_sending) {
bool /* is_sending */) {
const auto stats = GetAudioSendStreamStats();
EXPECT_EQ(info.ssrc(), stats.local_ssrc);
EXPECT_EQ(info.payload_bytes_sent, stats.payload_bytes_sent);
Expand Down
10 changes: 5 additions & 5 deletions modules/audio_device/audio_device_data_observer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,11 @@ class ADMWrapper : public AudioDeviceModule, public AudioTransport {

void PullRenderData(int /* bits_per_sample */,
int /* sample_rate */,
size_t number_of_channels,
size_t number_of_frames,
void* audio_data,
int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) override {
size_t /* number_of_channels */,
size_t /* number_of_frames */,
void* /* audio_data */,
int64_t* /* elapsed_time_ms */,
int64_t* /* ntp_time_ms */) override {
RTC_DCHECK_NOTREACHED();
}

Expand Down
4 changes: 2 additions & 2 deletions modules/audio_device/audio_device_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ class AudioDeviceModuleImpl : public AudioDeviceModuleForTest {

int RestartPlayoutInternally() override { return -1; }
int RestartRecordingInternally() override { return -1; }
int SetPlayoutSampleRate(uint32_t sample_rate) override { return -1; }
int SetRecordingSampleRate(uint32_t sample_rate) override { return -1; }
int SetPlayoutSampleRate(uint32_t /* sample_rate */) override { return -1; }
int SetRecordingSampleRate(uint32_t /* sample_rate */) override { return -1; }

private:
PlatformType Platform() const;
Expand Down
14 changes: 7 additions & 7 deletions modules/audio_device/audio_device_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,11 @@ class MockAudioTransport : public test::MockAudioTransport {
const size_t bytes_per_frame,
const size_t channels,
const uint32_t sample_rate,
const uint32_t total_delay_ms,
const int32_t clock_drift,
const uint32_t current_mic_level,
const bool typing_status,
uint32_t& new_mic_level) {
const uint32_t /* total_delay_ms */,
const int32_t /* clock_drift */,
const uint32_t /* current_mic_level */,
const bool /* typing_status */,
uint32_t& /* new_mic_level */) {
EXPECT_TRUE(rec_mode()) << "No test is expecting these callbacks.";
// Store audio parameters once in the first callback. For all other
// callbacks, verify that the provided audio parameters are maintained and
Expand Down Expand Up @@ -412,8 +412,8 @@ class MockAudioTransport : public test::MockAudioTransport {
const uint32_t sample_rate,
void* audio_buffer,
size_t& samples_out,
int64_t* elapsed_time_ms,
int64_t* ntp_time_ms) {
int64_t* /* elapsed_time_ms */,
int64_t* /* ntp_time_ms */) {
EXPECT_TRUE(play_mode()) << "No test is expecting these callbacks.";
// Store audio parameters once in the first callback. For all other
// callbacks, verify that the provided audio parameters are maintained and
Expand Down
37 changes: 19 additions & 18 deletions modules/audio_device/dummy/audio_device_dummy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,72 +157,73 @@ int32_t AudioDeviceDummy::MicrophoneVolumeIsAvailable(bool& /* available */) {
return -1;
}

int32_t AudioDeviceDummy::SetMicrophoneVolume(uint32_t volume) {
int32_t AudioDeviceDummy::SetMicrophoneVolume(uint32_t /* volume */) {
return -1;
}

int32_t AudioDeviceDummy::MicrophoneVolume(uint32_t& volume) const {
int32_t AudioDeviceDummy::MicrophoneVolume(uint32_t& /* volume */) const {
return -1;
}

int32_t AudioDeviceDummy::MaxMicrophoneVolume(uint32_t& maxVolume) const {
int32_t AudioDeviceDummy::MaxMicrophoneVolume(uint32_t& /* maxVolume */) const {
return -1;
}

int32_t AudioDeviceDummy::MinMicrophoneVolume(uint32_t& minVolume) const {
int32_t AudioDeviceDummy::MinMicrophoneVolume(uint32_t& /* minVolume */) const {
return -1;
}

int32_t AudioDeviceDummy::SpeakerMuteIsAvailable(bool& available) {
int32_t AudioDeviceDummy::SpeakerMuteIsAvailable(bool& /* available */) {
return -1;
}

int32_t AudioDeviceDummy::SetSpeakerMute(bool enable) {
int32_t AudioDeviceDummy::SetSpeakerMute(bool /* enable */) {
return -1;
}

int32_t AudioDeviceDummy::SpeakerMute(bool& enabled) const {
int32_t AudioDeviceDummy::SpeakerMute(bool& /* enabled */) const {
return -1;
}

int32_t AudioDeviceDummy::MicrophoneMuteIsAvailable(bool& available) {
int32_t AudioDeviceDummy::MicrophoneMuteIsAvailable(bool& /* available */) {
return -1;
}

int32_t AudioDeviceDummy::SetMicrophoneMute(bool enable) {
int32_t AudioDeviceDummy::SetMicrophoneMute(bool /* enable */) {
return -1;
}

int32_t AudioDeviceDummy::MicrophoneMute(bool& enabled) const {
int32_t AudioDeviceDummy::MicrophoneMute(bool& /* enabled */) const {
return -1;
}

int32_t AudioDeviceDummy::StereoPlayoutIsAvailable(bool& available) {
int32_t AudioDeviceDummy::StereoPlayoutIsAvailable(bool& /* available */) {
return -1;
}
int32_t AudioDeviceDummy::SetStereoPlayout(bool enable) {
int32_t AudioDeviceDummy::SetStereoPlayout(bool /* enable */) {
return -1;
}

int32_t AudioDeviceDummy::StereoPlayout(bool& enabled) const {
int32_t AudioDeviceDummy::StereoPlayout(bool& /* enabled */) const {
return -1;
}

int32_t AudioDeviceDummy::StereoRecordingIsAvailable(bool& available) {
int32_t AudioDeviceDummy::StereoRecordingIsAvailable(bool& /* available */) {
return -1;
}

int32_t AudioDeviceDummy::SetStereoRecording(bool enable) {
int32_t AudioDeviceDummy::SetStereoRecording(bool /* enable */) {
return -1;
}

int32_t AudioDeviceDummy::StereoRecording(bool& enabled) const {
int32_t AudioDeviceDummy::StereoRecording(bool& /* enabled */) const {
return -1;
}

int32_t AudioDeviceDummy::PlayoutDelay(uint16_t& delayMS) const {
int32_t AudioDeviceDummy::PlayoutDelay(uint16_t& /* delayMS */) const {
return -1;
}

void AudioDeviceDummy::AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) {}
void AudioDeviceDummy::AttachAudioBuffer(AudioDeviceBuffer* /* audioBuffer */) {
}
} // namespace webrtc
6 changes: 3 additions & 3 deletions modules/audio_device/dummy/file_audio_device.cc
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ int32_t FileAudioDevice::StereoPlayoutIsAvailable(bool& available) {
available = true;
return 0;
}
int32_t FileAudioDevice::SetStereoPlayout(bool enable) {
int32_t FileAudioDevice::SetStereoPlayout(bool /* enable */) {
return 0;
}

Expand All @@ -414,7 +414,7 @@ int32_t FileAudioDevice::StereoRecordingIsAvailable(bool& available) {
return 0;
}

int32_t FileAudioDevice::SetStereoRecording(bool enable) {
int32_t FileAudioDevice::SetStereoRecording(bool /* enable */) {
return 0;
}

Expand All @@ -423,7 +423,7 @@ int32_t FileAudioDevice::StereoRecording(bool& enabled) const {
return 0;
}

int32_t FileAudioDevice::PlayoutDelay(uint16_t& delayMS) const {
int32_t FileAudioDevice::PlayoutDelay(uint16_t& /* delayMS */) const {
return 0;
}

Expand Down
Loading

0 comments on commit 3fa21c8

Please sign in to comment.