This is an automated email from the ASF dual-hosted git repository.

dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new b1e9327069 Cleanup - some more clang-tidy recommendation. (#12172)
b1e9327069 is described below

commit b1e9327069fde8207c2d5ed6178addc4e237498e
Author: Damian Meden <[email protected]>
AuthorDate: Thu Apr 10 10:38:18 2025 +0200

    Cleanup - some more clang-tidy recommendation. (#12172)
    
    * Cleanup - some more clang-tidy recommendation.
---
 src/iocore/net/P_UnixNet.h                        | 3 ++-
 src/iocore/net/SSLUtils.cc                        | 2 +-
 src/proxy/http/remap/unit-tests/test_PluginDso.cc | 8 ++++----
 src/traffic_server/traffic_server.cc              | 2 +-
 4 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/iocore/net/P_UnixNet.h b/src/iocore/net/P_UnixNet.h
index 76ebdc7c58..865f5b6c51 100644
--- a/src/iocore/net/P_UnixNet.h
+++ b/src/iocore/net/P_UnixNet.h
@@ -198,8 +198,9 @@ check_transient_accept_error(int res)
     last_transient_accept_error = t;
     Warning("accept thread received transient error: errno = %d", -res);
 #if defined(__linux__)
-    if (res == -ENOBUFS || res == -ENFILE)
+    if (res == -ENOBUFS || res == -ENFILE) {
       Warning("errno : %d consider a memory upgrade", -res);
+    }
 #endif
   }
 }
diff --git a/src/iocore/net/SSLUtils.cc b/src/iocore/net/SSLUtils.cc
index 40bbf7b470..b7e5b0a511 100644
--- a/src/iocore/net/SSLUtils.cc
+++ b/src/iocore/net/SSLUtils.cc
@@ -1015,7 +1015,7 @@ asn1_strdup(ASN1_STRING *s)
   ink_assert(ASN1_STRING_type(s) == V_ASN1_IA5STRING || ASN1_STRING_type(s) == 
V_ASN1_UTF8STRING ||
              ASN1_STRING_type(s) == V_ASN1_PRINTABLESTRING || 
ASN1_STRING_type(s) == V_ASN1_T61STRING);
 
-  return ats_strndup((const char *)ASN1_STRING_get0_data(s), 
ASN1_STRING_length(s));
+  return ats_strndup(reinterpret_cast<const char *>(ASN1_STRING_get0_data(s)), 
ASN1_STRING_length(s));
 }
 
 // This callback function is executed while OpenSSL processes the SSL
diff --git a/src/proxy/http/remap/unit-tests/test_PluginDso.cc 
b/src/proxy/http/remap/unit-tests/test_PluginDso.cc
index e3d4071494..1cf5bd82a7 100644
--- a/src/proxy/http/remap/unit-tests/test_PluginDso.cc
+++ b/src/proxy/http/remap/unit-tests/test_PluginDso.cc
@@ -68,20 +68,20 @@ public:
   {
   }
 
-  virtual void
+  void
   indicatePreReload() override
   {
   }
-  virtual void
+  void
   indicatePostReload(TSRemapReloadStatus /* reloadStatus ATS_UNUSED */) 
override
   {
   }
-  virtual bool
+  bool
   init(std::string & /* error ATS_UNUSED */) override
   {
     return true;
   }
-  virtual void
+  void
   done() override
   {
   }
diff --git a/src/traffic_server/traffic_server.cc 
b/src/traffic_server/traffic_server.cc
index ece3dab22b..ce482eb31b 100644
--- a/src/traffic_server/traffic_server.cc
+++ b/src/traffic_server/traffic_server.cc
@@ -595,7 +595,7 @@ init_memory_tracker(const char *config_var, RecDataT /* 
type ATS_UNUSED */, RecD
 void
 proxy_signal_handler(int signo, siginfo_t *info, void *ctx)
 {
-  if ((unsigned)signo < countof(signal_received)) {
+  if (static_cast<unsigned>(signo) < countof(signal_received)) {
     signal_received[signo] = true;
   }
 

Reply via email to