diff --git a/api/array_view_unittest.cc b/api/array_view_unittest.cc index 194d8aaf01..af1372b7c7 100644 --- a/api/array_view_unittest.cc +++ b/api/array_view_unittest.cc @@ -36,7 +36,7 @@ size_t Call(ArrayView av) { } template -void CallFixed(ArrayView av) {} +void CallFixed(ArrayView /* av */) {} } // namespace diff --git a/api/audio/audio_device_defines.h b/api/audio/audio_device_defines.h index d27f732a61..476c2910dd 100644 --- a/api/audio/audio_device_defines.h +++ b/api/audio/audio_device_defines.h @@ -57,7 +57,7 @@ class AudioTransport { uint32_t currentMicLevel, bool keyPressed, uint32_t& newMicLevel, - std::optional estimatedCaptureTimeNS) { // NOLINT + std::optional /* 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. diff --git a/api/audio/audio_processing.cc b/api/audio/audio_processing.cc index eab5075ed5..793c1a61b6 100644 --- a/api/audio/audio_processing.cc +++ b/api/audio/audio_processing.cc @@ -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; diff --git a/api/audio/audio_view.h b/api/audio/audio_view.h index e75769b7a0..00e3275258 100644 --- a/api/audio/audio_view.h +++ b/api/audio/audio_view.h @@ -167,7 +167,7 @@ class DeinterleavedView { }; template -constexpr size_t NumChannels(const MonoView& view) { +constexpr size_t NumChannels(const MonoView& /* view */) { return 1u; } @@ -182,22 +182,22 @@ size_t NumChannels(const DeinterleavedView& view) { } template -constexpr bool IsMono(const MonoView& view) { +constexpr bool IsMono(const MonoView& /* view */) { return true; } template -constexpr bool IsInterleavedView(const MonoView& view) { +constexpr bool IsInterleavedView(const MonoView& /* view */) { return true; } template -constexpr bool IsInterleavedView(const InterleavedView& view) { +constexpr bool IsInterleavedView(const InterleavedView& /* view */) { return true; } template -constexpr bool IsInterleavedView(const DeinterleavedView& view) { +constexpr bool IsInterleavedView(const DeinterleavedView& /* view */) { return false; } diff --git a/api/audio/echo_control.h b/api/audio/echo_control.h index 74fbc27b12..2ea23d6d8e 100644 --- a/api/audio/echo_control.h +++ b/api/audio/echo_control.h @@ -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; diff --git a/api/transport/stun.h b/api/transport/stun.h index cfe8cbcd05..5ba4c73c4f 100644 --- a/api/transport/stun.h +++ b/api/transport/stun.h @@ -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. diff --git a/logging/rtc_event_log/events/rtc_event_dtls_transport_state.h b/logging/rtc_event_log/events/rtc_event_dtls_transport_state.h index a242811945..9b53dd760a 100644 --- a/logging/rtc_event_log/events/rtc_event_dtls_transport_state.h +++ b/logging/rtc_event_log/events/rtc_event_dtls_transport_state.h @@ -50,15 +50,15 @@ class RtcEventDtlsTransportState : public RtcEvent { return dtls_transport_state_; } - static std::string Encode(rtc::ArrayView batch) { + static std::string Encode(rtc::ArrayView /* batch */) { // TODO(terelius): Implement return ""; } static RtcEventLogParseStatus Parse( - absl::string_view encoded_bytes, - bool batched, - std::vector& output) { + absl::string_view /* encoded_bytes */, + bool /* batched */, + std::vector& /* output */) { // TODO(terelius): Implement return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__); } diff --git a/logging/rtc_event_log/events/rtc_event_dtls_writable_state.h b/logging/rtc_event_log/events/rtc_event_dtls_writable_state.h index fec4cd46ad..08a74f7cc9 100644 --- a/logging/rtc_event_log/events/rtc_event_dtls_writable_state.h +++ b/logging/rtc_event_log/events/rtc_event_dtls_writable_state.h @@ -50,15 +50,15 @@ class RtcEventDtlsWritableState : public RtcEvent { bool writable() const { return writable_; } - static std::string Encode(rtc::ArrayView batch) { + static std::string Encode(rtc::ArrayView /* batch */) { // TODO(terelius): Implement return ""; } static RtcEventLogParseStatus Parse( - absl::string_view encoded_bytes, - bool batched, - std::vector& output) { + absl::string_view /* encoded_bytes */, + bool /* batched */, + std::vector& /* output */) { // TODO(terelius): Implement return RtcEventLogParseStatus::Error("Not Implemented", __FILE__, __LINE__); } diff --git a/p2p/base/stun_request.h b/p2p/base/stun_request.h index f2fd7e5211..6b67c6cb74 100644 --- a/p2p/base/stun_request.h +++ b/p2p/base/stun_request.h @@ -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(); diff --git a/rtc_base/ifaddrs_converter.cc b/rtc_base/ifaddrs_converter.cc index d963efd6ef..9379c8e069 100644 --- a/rtc_base/ifaddrs_converter.cc +++ b/rtc_base/ifaddrs_converter.cc @@ -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; diff --git a/rtc_base/network.cc b/rtc_base/network.cc index 79c96994a5..cc6565b307 100644 --- a/rtc_base/network.cc +++ b/rtc_base/network.cc @@ -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; } diff --git a/rtc_base/network.h b/rtc_base/network.h index 42b05b5191..4e3c3f5900 100644 --- a/rtc_base/network.h +++ b/rtc_base/network.h @@ -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& vpn) {} + virtual void set_vpn_list(const std::vector& /* vpn */) {} }; // Represents a Unix-type network interface, with a name and single address. diff --git a/rtc_base/network_monitor.h b/rtc_base/network_monitor.h index 605854f6ea..c042ab02b7 100644 --- a/rtc_base/network_monitor.h +++ b/rtc_base/network_monitor.h @@ -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; } diff --git a/rtc_base/physical_socket_server.cc b/rtc_base/physical_socket_server.cc index af133b8529..5f9959a8df 100644 --- a/rtc_base/physical_socket_server.cc +++ b/rtc_base/physical_socket_server.cc @@ -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; diff --git a/rtc_base/thread.cc b/rtc_base/thread.cc index 6f101ac8f4..67d6bb831c 100644 --- a/rtc_base/thread.cc +++ b/rtc_base/thread.cc @@ -456,8 +456,8 @@ absl::AnyInvocable Thread::Get(int cmsWait) { } void Thread::PostTaskImpl(absl::AnyInvocable 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 task, void Thread::PostDelayedTaskImpl(absl::AnyInvocable 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 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)