From eca11ca18b76bfd5613488fa26394df6c59e79f3 Mon Sep 17 00:00:00 2001 From: Dor Hen Date: Wed, 2 Oct 2024 12:31:52 -0700 Subject: [PATCH] Comment unused variables in implemented functions 2\n Bug: webrtc:370878648 Change-Id: Idcead9b143b65d6f5f42187d1bd3bf75227c765f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364504 Reviewed-by: Harald Alvestrand Commit-Queue: Danil Chapovalov Reviewed-by: Danil Chapovalov Reviewed-by: Mirko Bonadei Cr-Commit-Position: refs/heads/main@{#43159} --- rtc_base/event_tracer.cc | 6 +++--- rtc_base/null_socket_server.cc | 2 +- rtc_base/openssl_utility.cc | 3 ++- rtc_base/socket_server.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rtc_base/event_tracer.cc b/rtc_base/event_tracer.cc index 7e9ecba584..fcd2055d48 100644 --- a/rtc_base/event_tracer.cc +++ b/rtc_base/event_tracer.cc @@ -129,7 +129,7 @@ class EventLogger final { const unsigned char* arg_types, const unsigned long long* arg_values, uint64_t timestamp, - int pid, + int /* pid */, rtc::PlatformThreadId thread_id) { std::vector args(num_args); for (int i = 0; i < num_args; ++i) { @@ -379,12 +379,12 @@ const unsigned char* InternalEnableAllCategories(const char* name) { void InternalAddTraceEvent(char phase, const unsigned char* category_enabled, const char* name, - unsigned long long id, + unsigned long long /* id */, int num_args, const char** arg_names, const unsigned char* arg_types, const unsigned long long* arg_values, - unsigned char flags) { + unsigned char /* flags */) { // Fast path for when event tracing is inactive. if (g_event_logging_active.load() == 0) return; diff --git a/rtc_base/null_socket_server.cc b/rtc_base/null_socket_server.cc index 366349db3a..e8bdd66217 100644 --- a/rtc_base/null_socket_server.cc +++ b/rtc_base/null_socket_server.cc @@ -21,7 +21,7 @@ NullSocketServer::NullSocketServer() = default; NullSocketServer::~NullSocketServer() {} bool NullSocketServer::Wait(webrtc::TimeDelta max_wait_duration, - bool process_io) { + bool /* process_io */) { // Wait with the given timeout. Do not log a warning if we end up waiting for // a long time; that just means no one has any work for us, which is perfectly // legitimate. diff --git a/rtc_base/openssl_utility.cc b/rtc_base/openssl_utility.cc index eba3788a94..d6e1e1eb34 100644 --- a/rtc_base/openssl_utility.cc +++ b/rtc_base/openssl_utility.cc @@ -42,7 +42,8 @@ namespace { // TODO(crbug.com/webrtc/11710): When OS certificate verification is available, // and we don't need VerifyPeerCertMatchesHost, don't compile this in order to // avoid a dependency on OpenSSL X509 objects (see crbug.com/webrtc/11410). -void LogCertificates(SSL* ssl, X509* certificate) { +void LogCertificates([[maybe_unused]] SSL* ssl, + [[maybe_unused]] X509* certificate) { // Logging certificates is extremely verbose. So it is disabled by default. #ifdef LOG_CERTIFICATES BIO* mem = BIO_new(BIO_s_mem()); diff --git a/rtc_base/socket_server.h b/rtc_base/socket_server.h index bf1326dad9..61b4f4dc89 100644 --- a/rtc_base/socket_server.h +++ b/rtc_base/socket_server.h @@ -39,7 +39,7 @@ class SocketServer : public SocketFactory { // to allow the socket server to use the thread's message queue for any // messaging that it might need to perform. It is also called with a null // argument before the thread is destroyed. - virtual void SetMessageQueue(Thread* queue) {} + virtual void SetMessageQueue(Thread* /* queue */) {} // Sleeps until: // 1) `max_wait_duration` has elapsed (unless `max_wait_duration` ==