You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2022/07/13 00:53:37 UTC

[trafficserver] branch master updated: Remove unneccessary const qualifiers (#8957)

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

maskit 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 828b7d3e4 Remove unneccessary const qualifiers (#8957)
828b7d3e4 is described below

commit 828b7d3e40655982f8abc88a5e634ed17ec39681
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Wed Jul 13 09:53:32 2022 +0900

    Remove unneccessary const qualifiers (#8957)
---
 configure.ac                                | 2 +-
 iocore/net/quic/QUICFrame.cc                | 4 ++--
 iocore/net/quic/QUICFrame.h                 | 4 ++--
 iocore/net/quic/QUICPacket.cc               | 2 +-
 iocore/net/quic/QUICPacket.h                | 2 +-
 plugins/regex_revalidate/regex_revalidate.c | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/configure.ac b/configure.ac
index f3909f774..3e9b7871b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -874,7 +874,7 @@ case $host_os_def in
 
   darwin)
     AS_IF([test "x$ax_cv_c_compiler_vendor" = "xclang"], [
-      common_opt="-pipe -Wall -Qunused-arguments -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter"
+      common_opt="-pipe -Wall -Qunused-arguments -Wextra -Wno-unused-parameter"
       debug_opt="-g $common_opt"
       release_opt="-g $common_opt $optimizing_flags -fno-strict-aliasing"
       cxx_opt="-Wno-invalid-offsetof"
diff --git a/iocore/net/quic/QUICFrame.cc b/iocore/net/quic/QUICFrame.cc
index 35c14b683..01bd80035 100644
--- a/iocore/net/quic/QUICFrame.cc
+++ b/iocore/net/quic/QUICFrame.cc
@@ -939,13 +939,13 @@ QUICAckFrame::AckBlockSection::const_iterator::operator++()
   return this->_current_block;
 }
 
-const bool
+bool
 QUICAckFrame::AckBlockSection::const_iterator::operator!=(const const_iterator &ite) const
 {
   return this->_index != ite._index;
 }
 
-const bool
+bool
 QUICAckFrame::AckBlockSection::const_iterator::operator==(const const_iterator &ite) const
 {
   return this->_index == ite._index;
diff --git a/iocore/net/quic/QUICFrame.h b/iocore/net/quic/QUICFrame.h
index a0b4af907..0eda989e6 100644
--- a/iocore/net/quic/QUICFrame.h
+++ b/iocore/net/quic/QUICFrame.h
@@ -223,8 +223,8 @@ public:
         return &this->_current_block;
       };
       const QUICAckFrame::AckBlock &operator++();
-      const bool operator!=(const const_iterator &ite) const;
-      const bool operator==(const const_iterator &ite) const;
+      bool operator!=(const const_iterator &ite) const;
+      bool operator==(const const_iterator &ite) const;
 
     private:
       uint8_t _index                                         = 0;
diff --git a/iocore/net/quic/QUICPacket.cc b/iocore/net/quic/QUICPacket.cc
index 5f5707dce..4adb0c8dd 100644
--- a/iocore/net/quic/QUICPacket.cc
+++ b/iocore/net/quic/QUICPacket.cc
@@ -1066,7 +1066,7 @@ QUICVersionNegotiationPacketR::payload_block() const
   return this->_payload_block;
 }
 
-const QUICVersion
+QUICVersion
 QUICVersionNegotiationPacketR::supported_version(uint8_t index) const
 {
   return QUICTypeUtil::read_QUICVersion(this->_versions + sizeof(QUICVersion) * index);
diff --git a/iocore/net/quic/QUICPacket.h b/iocore/net/quic/QUICPacket.h
index 49d0b145f..aba3d88ed 100644
--- a/iocore/net/quic/QUICPacket.h
+++ b/iocore/net/quic/QUICPacket.h
@@ -354,7 +354,7 @@ public:
   Ptr<IOBufferBlock> header_block() const override;
   Ptr<IOBufferBlock> payload_block() const override;
 
-  const QUICVersion supported_version(uint8_t index) const;
+  QUICVersion supported_version(uint8_t index) const;
   int nversions() const;
 
 private:
diff --git a/plugins/regex_revalidate/regex_revalidate.c b/plugins/regex_revalidate/regex_revalidate.c
index 31fffad90..7710ad0d4 100644
--- a/plugins/regex_revalidate/regex_revalidate.c
+++ b/plugins/regex_revalidate/regex_revalidate.c
@@ -95,7 +95,7 @@ increment_stat(TSCacheLookupResult const result)
   }
 }
 
-static char const *const
+static const char *
 strForResult(TSCacheLookupResult const result)
 {
   switch (result) {