Comment unused variables in implemented functions 3\n

Bug: webrtc:370878648
Change-Id: I40251cc529cc20fbf2b034fa25798965b91dbd88
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364683
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43278}
This commit is contained in:
Dor Hen 2024-10-22 02:27:35 -07:00 committed by WebRTC LUCI CQ
parent 7a3c07b8ef
commit 6d58a43413
15 changed files with 38 additions and 36 deletions

View File

@ -36,7 +36,7 @@ size_t Call(ArrayView<T> av) {
}
template <typename T, size_t N>
void CallFixed(ArrayView<T, N> av) {}
void CallFixed(ArrayView<T, N> /* av */) {}
} // namespace

View File

@ -57,7 +57,7 @@ class AudioTransport {
uint32_t currentMicLevel,
bool keyPressed,
uint32_t& newMicLevel,
std::optional<int64_t> estimatedCaptureTimeNS) { // NOLINT
std::optional<int64_t> /* estimatedCaptureTimeNS */) { // NOLINT
// TODO(webrtc:13620) Make the default behaver of the new API to behave as
// the old API. This can be pure virtual if all uses of the old API is
// removed.

View File

@ -58,7 +58,7 @@ std::string GainController1ModeToString(const Agc1Config::Mode& mode) {
constexpr int AudioProcessing::kNativeSampleRatesHz[];
void CustomProcessing::SetRuntimeSetting(
AudioProcessing::RuntimeSetting setting) {}
AudioProcessing::RuntimeSetting /* setting */) {}
bool Agc1Config::operator==(const Agc1Config& rhs) const {
const auto& analog_lhs = analog_gain_controller;

View File

@ -167,7 +167,7 @@ class DeinterleavedView {
};
template <typename T>
constexpr size_t NumChannels(const MonoView<T>& view) {
constexpr size_t NumChannels(const MonoView<T>& /* view */) {
return 1u;
}
@ -182,22 +182,22 @@ size_t NumChannels(const DeinterleavedView<T>& view) {
}
template <typename T>
constexpr bool IsMono(const MonoView<T>& view) {
constexpr bool IsMono(const MonoView<T>& /* view */) {
return true;
}
template <typename T>
constexpr bool IsInterleavedView(const MonoView<T>& view) {
constexpr bool IsInterleavedView(const MonoView<T>& /* view */) {
return true;
}
template <typename T>
constexpr bool IsInterleavedView(const InterleavedView<T>& view) {
constexpr bool IsInterleavedView(const InterleavedView<T>& /* view */) {
return true;
}
template <typename T>
constexpr bool IsInterleavedView(const DeinterleavedView<const T>& view) {
constexpr bool IsInterleavedView(const DeinterleavedView<const T>& /* view */) {
return false;
}

View File

@ -53,7 +53,7 @@ class EchoControl {
// resulting output is anyway not used, for instance when the endpoint is
// muted.
// TODO(b/177830919): Make pure virtual.
virtual void SetCaptureOutputUsage(bool capture_output_used) {}
virtual void SetCaptureOutputUsage(bool /* capture_output_used */) {}
// Returns wheter the signal is altered.
virtual bool ActiveProcessing() const = 0;

View File

@ -345,7 +345,7 @@ class StunAttribute {
virtual StunAttributeValueType value_type() const = 0;
// Only XorAddressAttribute needs this so far.
virtual void SetOwner(StunMessage* owner) {}
virtual void SetOwner(StunMessage* /* owner */) {}
// Reads the body (not the type or length) for this type of attribute from
// the given buffer. Return value is true if successful.

View File

@ -50,15 +50,15 @@ class RtcEventDtlsTransportState : public RtcEvent {
return dtls_transport_state_;
}
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<LoggedDtlsTransportState>& output) {
absl::string_view /* encoded_bytes */,
bool /* batched */,
std::vector<LoggedDtlsTransportState>& /* output */) {
// TODO(terelius): Implement
return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__);
}

View File

@ -50,15 +50,15 @@ class RtcEventDtlsWritableState : public RtcEvent {
bool writable() const { return writable_; }
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<LoggedDtlsWritableState>& output) {
absl::string_view /* encoded_bytes */,
bool /* batched */,
std::vector<LoggedDtlsWritableState>& /* output */) {
// TODO(terelius): Implement
return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__);
}

View File

@ -134,8 +134,8 @@ class StunRequest {
StunMessage* mutable_msg() { return msg_.get(); }
// Called when the message receives a response or times out.
virtual void OnResponse(StunMessage* response) {}
virtual void OnErrorResponse(StunMessage* response) {}
virtual void OnResponse(StunMessage* /* response */) {}
virtual void OnErrorResponse(StunMessage* /* response */) {}
virtual void OnTimeout() {}
// Called when the message is sent.
virtual void OnSent();

View File

@ -47,7 +47,7 @@ bool IfAddrsConverter::ConvertIfAddrsToIPAddress(
}
bool IfAddrsConverter::ConvertNativeAttributesToIPAttributes(
const struct ifaddrs* interface,
const struct ifaddrs* /* interface */,
int* ip_attributes) {
*ip_attributes = IPV6_ADDRESS_FLAG_NONE;
return true;

View File

@ -298,7 +298,8 @@ NetworkManager::EnumerationPermission NetworkManager::enumeration_permission()
return ENUMERATION_ALLOWED;
}
bool NetworkManager::GetDefaultLocalAddress(int family, IPAddress* addr) const {
bool NetworkManager::GetDefaultLocalAddress(int /* family */,
IPAddress* /* addr */) const {
return false;
}

View File

@ -185,7 +185,7 @@ class RTC_EXPORT NetworkManager : public DefaultLocalAddressProvider,
// MdnsResponderProvider interface.
webrtc::MdnsResponderInterface* GetMdnsResponder() const override;
virtual void set_vpn_list(const std::vector<NetworkMask>& vpn) {}
virtual void set_vpn_list(const std::vector<NetworkMask>& /* vpn */) {}
};
// Represents a Unix-type network interface, with a name and single address.

View File

@ -113,9 +113,9 @@ class NetworkMonitorInterface {
// Bind a socket to an interface specified by ip address and/or interface
// name. Only implemented on Android.
virtual NetworkBindingResult BindSocketToNetwork(
int socket_fd,
const IPAddress& address,
absl::string_view interface_name) {
int /* socket_fd */,
const IPAddress& /* address */,
absl::string_view /* interface_name */) {
return NetworkBindingResult::NOT_IMPLEMENTED;
}

View File

@ -90,7 +90,7 @@ int64_t GetSocketRecvTimestamp(int socket) {
#else
int64_t GetSocketRecvTimestamp(int socket) {
int64_t GetSocketRecvTimestamp(int /* socket */) {
return -1;
}
#endif
@ -1167,7 +1167,7 @@ class Signaler : public Dispatcher {
uint32_t GetRequestedEvents() override { return DE_READ; }
void OnEvent(uint32_t ff, int err) override {
void OnEvent(uint32_t /* ff */, int /* err */) override {
// It is not possible to perfectly emulate an auto-resetting event with
// pipes. This simulates it by resetting before the event is handled.
@ -1349,7 +1349,7 @@ void PhysicalSocketServer::Remove(Dispatcher* pdispatcher) {
#endif // WEBRTC_USE_EPOLL
}
void PhysicalSocketServer::Update(Dispatcher* pdispatcher) {
void PhysicalSocketServer::Update([[maybe_unused]] Dispatcher* pdispatcher) {
#if defined(WEBRTC_USE_EPOLL)
if (epoll_fd_ == INVALID_SOCKET) {
return;

View File

@ -456,8 +456,8 @@ absl::AnyInvocable<void() &&> Thread::Get(int cmsWait) {
}
void Thread::PostTaskImpl(absl::AnyInvocable<void() &&> task,
const PostTaskTraits& traits,
const webrtc::Location& location) {
const PostTaskTraits& /* traits */,
const webrtc::Location& /* location */) {
if (IsQuitting()) {
return;
}
@ -475,8 +475,8 @@ void Thread::PostTaskImpl(absl::AnyInvocable<void() &&> task,
void Thread::PostDelayedTaskImpl(absl::AnyInvocable<void() &&> task,
webrtc::TimeDelta delay,
const PostDelayedTaskTraits& traits,
const webrtc::Location& location) {
const PostDelayedTaskTraits& /* traits */,
const webrtc::Location& /* location */) {
if (IsQuitting()) {
return;
}
@ -724,7 +724,7 @@ void Thread::Stop() {
}
void Thread::BlockingCallImpl(rtc::FunctionView<void()> functor,
const webrtc::Location& location) {
const webrtc::Location& /* location */) {
TRACE_EVENT0("webrtc", "Thread::BlockingCall");
RTC_DCHECK(!IsQuitting());
@ -858,8 +858,9 @@ bool Thread::ProcessMessages(int cmsLoop) {
}
}
bool Thread::WrapCurrentWithThreadManager(ThreadManager* thread_manager,
bool need_synchronize_access) {
bool Thread::WrapCurrentWithThreadManager(
ThreadManager* thread_manager,
[[maybe_unused]] bool need_synchronize_access) {
RTC_DCHECK(!IsRunning());
#if defined(WEBRTC_WIN)