You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2022/08/23 17:22:38 UTC

[trafficserver] 01/02: Require use of 'override' keyword when valid. (#8737)

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

zwoop pushed a commit to branch 9.2.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 034aab400ff79105dd7ca32f1c264d664414af90
Author: Walt Karas <wk...@verizonmedia.com>
AuthorDate: Thu Mar 17 21:26:46 2022 -0500

    Require use of 'override' keyword when valid. (#8737)
    
    Co-authored-by: Walt Karas <wk...@yahooinc.com>
    (cherry picked from commit 97ee33cc8f07974d490d3a99dafffc49ad59493d)
---
 configure.ac                                       |  4 +-
 include/tscore/PluginUserArgs.h                    |  4 +-
 iocore/cache/CacheTest.cc                          | 31 ++++++-----
 iocore/cache/P_CacheTest.h                         |  4 +-
 iocore/net/P_QUICNextProtocolAccept.h              |  4 +-
 iocore/net/quic/Mock.h                             | 64 +++++++++++-----------
 plugins/esi/esi.cc                                 |  4 +-
 plugins/esi/test/StubIncludeHandler.h              |  8 +--
 plugins/esi/test/TestHttpDataFetcher.h             |  8 +--
 plugins/experimental/parent_select/strategy.h      | 30 +++++-----
 .../experimental/webp_transform/ImageTransform.cc  |  7 +++
 plugins/s3_auth/unit_tests/test_aws_auth_v4.h      | 12 ++--
 proxy/http/remap/PluginDso.h                       |  4 +-
 proxy/http/remap/unit-tests/test_PluginDso.cc      |  8 +--
 proxy/http/remap/unit-tests/test_PluginFactory.cc  |  2 +-
 proxy/http3/Http3SessionAccept.h                   |  4 +-
 src/wccp/WccpLocal.h                               | 45 ++++++++-------
 17 files changed, 125 insertions(+), 118 deletions(-)

diff --git a/configure.ac b/configure.ac
index 86c2e8f7d..b7912ba42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -863,7 +863,7 @@ case $host_os_def in
       common_opt="-pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter -Wno-format-truncation -Wno-cast-function-type -Wno-stringop-overflow"
       debug_opt="-ggdb3 $common_opt"
       release_opt="-g $common_opt $optimizing_flags -feliminate-unused-debug-symbols -fno-strict-aliasing"
-      cxx_opt="-Wno-invalid-offsetof -Wno-noexcept-type"
+      cxx_opt="-Wno-invalid-offsetof -Wno-noexcept-type -Wsuggest-override"
       # Special options for flex generated .c files
       flex_cflags="-Wno-unused-parameter"
     ])
@@ -904,7 +904,7 @@ case $host_os_def in
       common_opt="-pipe -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter"
       debug_opt="-ggdb3 $common_opt"
       release_opt="-g $common_opt $optimizing_flags -feliminate-unused-debug-symbols -fno-strict-aliasing"
-      cxx_opt="-Wno-invalid-offsetof"
+      cxx_opt="-Wno-invalid-offsetof -Wsuggest-override"
     ])
 
     AS_IF([test -d /usr/local/lib], [
diff --git a/include/tscore/PluginUserArgs.h b/include/tscore/PluginUserArgs.h
index 4dd637b21..b466829c1 100644
--- a/include/tscore/PluginUserArgs.h
+++ b/include/tscore/PluginUserArgs.h
@@ -86,7 +86,7 @@ template <TSUserArgType I> class PluginUserArgs : public virtual PluginUserArgsM
 {
 public:
   void *
-  get_user_arg(size_t ix) const
+  get_user_arg(size_t ix) const override
   {
     ink_release_assert(SanityCheckUserIndex(I, ix));
     ix -= get_user_arg_offset(I);
@@ -95,7 +95,7 @@ public:
   };
 
   void
-  set_user_arg(size_t ix, void *arg)
+  set_user_arg(size_t ix, void *arg) override
   {
     ink_release_assert(SanityCheckUserIndex(I, ix));
     ix -= get_user_arg_offset(I);
diff --git a/iocore/cache/CacheTest.cc b/iocore/cache/CacheTest.cc
index d4f1b0cd0..c1ea6fb4c 100644
--- a/iocore/cache/CacheTest.cc
+++ b/iocore/cache/CacheTest.cc
@@ -333,7 +333,7 @@ EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int /* atype ATS_UNUSED */,
 
   CACHE_SM(
     t, replace_write_test,
-    { cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_SYNC); } int open_write_callout() {
+    { cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_SYNC); } int open_write_callout() override {
       header.serial = 10;
       cache_vc->set_header(&header, sizeof(header));
       cvio = cache_vc->do_io_write(this, nbytes, buffer_reader);
@@ -346,18 +346,19 @@ EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int /* atype ATS_UNUSED */,
 
   CACHE_SM(
     t, replace_test,
-    { cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_OVERWRITE_SYNC); } int open_write_callout() {
-      CacheTestHeader *h = nullptr;
-      int hlen           = 0;
-      if (cache_vc->get_header((void **)&h, &hlen) < 0)
-        return -1;
-      if (h->serial != 10)
-        return -1;
-      header.serial = 11;
-      cache_vc->set_header(&header, sizeof(header));
-      cvio = cache_vc->do_io_write(this, nbytes, buffer_reader);
-      return 1;
-    });
+    { cacheProcessor.open_write(this, &key, CACHE_FRAG_TYPE_NONE, 100, CACHE_WRITE_OPT_OVERWRITE_SYNC); } int open_write_callout()
+      override {
+        CacheTestHeader *h = nullptr;
+        int hlen           = 0;
+        if (cache_vc->get_header((void **)&h, &hlen) < 0)
+          return -1;
+        if (h->serial != 10)
+          return -1;
+        header.serial = 11;
+        cache_vc->set_header(&header, sizeof(header));
+        cvio = cache_vc->do_io_write(this, nbytes, buffer_reader);
+        return 1;
+      });
   replace_test.expect_initial_event = CACHE_EVENT_OPEN_WRITE;
   replace_test.expect_event         = VC_EVENT_WRITE_COMPLETE;
   replace_test.nbytes               = 100;
@@ -365,7 +366,7 @@ EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int /* atype ATS_UNUSED */,
   replace_test.content_salt         = 1;
 
   CACHE_SM(
-    t, replace_read_test, { cacheProcessor.open_read(this, &key); } int open_read_callout() {
+    t, replace_read_test, { cacheProcessor.open_read(this, &key); } int open_read_callout() override {
       CacheTestHeader *h = nullptr;
       int hlen           = 0;
       if (cache_vc->get_header((void **)&h, &hlen) < 0)
@@ -388,7 +389,7 @@ EXCLUSIVE_REGRESSION_TEST(cache)(RegressionTest *t, int /* atype ATS_UNUSED */,
   rand_CacheKey(&large_write_test.key, thread->mutex);
 
   CACHE_SM(
-    t, pread_test, { cacheProcessor.open_read(this, &key); } int open_read_callout() {
+    t, pread_test, { cacheProcessor.open_read(this, &key); } int open_read_callout() override {
       cvio = cache_vc->do_io_pread(this, nbytes, buffer, 7000000);
       return 1;
     });
diff --git a/iocore/cache/P_CacheTest.h b/iocore/cache/P_CacheTest.h
index 47f0cfd3b..40d797cdb 100644
--- a/iocore/cache/P_CacheTest.h
+++ b/iocore/cache/P_CacheTest.h
@@ -130,7 +130,7 @@ struct CacheTestSM : public RegressionSM {
 #define CACHE_SM(_t, _sm, _f)                                               \
   struct CacheTestSM__##_sm : public CacheTestSM {                          \
     void                                                                    \
-    make_request_internal() _f                                              \
+    make_request_internal() override _f                                     \
                                                                             \
       CacheTestSM__##_sm(RegressionTest *t)                                 \
       : CacheTestSM(t, #_sm)                                                \
@@ -139,7 +139,7 @@ struct CacheTestSM : public RegressionSM {
                                                                             \
     CacheTestSM__##_sm(const CacheTestSM__##_sm &xsm) : CacheTestSM(xsm) {} \
     RegressionSM *                                                          \
-    clone()                                                                 \
+    clone() override                                                        \
     {                                                                       \
       return new CacheTestSM__##_sm(*this);                                 \
     }                                                                       \
diff --git a/iocore/net/P_QUICNextProtocolAccept.h b/iocore/net/P_QUICNextProtocolAccept.h
index 95752dd21..3ca44db55 100644
--- a/iocore/net/P_QUICNextProtocolAccept.h
+++ b/iocore/net/P_QUICNextProtocolAccept.h
@@ -33,7 +33,7 @@ public:
   QUICNextProtocolAccept();
   ~QUICNextProtocolAccept();
 
-  bool accept(NetVConnection *, MIOBuffer *, IOBufferReader *);
+  bool accept(NetVConnection *, MIOBuffer *, IOBufferReader *) override;
 
   // Register handler as an endpoint for the specified protocol. Neither
   // handler nor protocol are copied, so the caller must guarantee their
@@ -50,7 +50,7 @@ public:
   QUICNextProtocolAccept &operator=(const QUICNextProtocolAccept &) = delete; // disabled
 
 private:
-  int mainEvent(int event, void *netvc);
+  int mainEvent(int event, void *netvc) override;
 
   SSLNextProtocolSet protoset;
   SessionProtocolSet protoenabled;
diff --git a/iocore/net/quic/Mock.h b/iocore/net/quic/Mock.h
index 3185315dc..17cbf40c6 100644
--- a/iocore/net/quic/Mock.h
+++ b/iocore/net/quic/Mock.h
@@ -46,25 +46,25 @@ std::string_view negotiated_application_name_sv = "h3-29"sv;
 class MockQUICLDConfig : public QUICLDConfig
 {
   uint32_t
-  packet_threshold() const
+  packet_threshold() const override
   {
     return 3;
   }
 
   float
-  time_threshold() const
+  time_threshold() const override
   {
     return 1.25;
   }
 
   ink_hrtime
-  granularity() const
+  granularity() const override
   {
     return HRTIME_MSECONDS(1);
   }
 
   ink_hrtime
-  initial_rtt() const
+  initial_rtt() const override
   {
     return HRTIME_MSECONDS(100);
   }
@@ -79,25 +79,25 @@ class MockQUICCCConfig : public QUICCCConfig
   }
 
   uint32_t
-  initial_window() const
+  initial_window() const override
   {
     return 10;
   }
 
   uint32_t
-  minimum_window() const
+  minimum_window() const override
   {
     return 2;
   }
 
   float
-  loss_reduction_factor() const
+  loss_reduction_factor() const override
   {
     return 0.5;
   }
 
   uint32_t
-  persistent_congestion_threshold() const
+  persistent_congestion_threshold() const override
   {
     return 2;
   }
@@ -108,22 +108,22 @@ class MockQUICPathManager : public QUICPathManager
 public:
   virtual ~MockQUICPathManager() {}
   virtual const QUICPath &
-  get_current_path()
+  get_current_path() override
   {
     return _path;
   }
   virtual const QUICPath &
-  get_verified_path()
+  get_verified_path() override
   {
     return _path;
   }
   virtual void
-  open_new_path(const QUICPath &path, ink_hrtime timeout_in)
+  open_new_path(const QUICPath &path, ink_hrtime timeout_in) override
   {
     return;
   }
   virtual void
-  set_trusted_path(const QUICPath &path)
+  set_trusted_path(const QUICPath &path) override
   {
     return;
   }
@@ -288,58 +288,58 @@ class MockNetVConnection : public NetVConnection
 public:
   MockNetVConnection(NetVConnectionContext_t context = NET_VCONNECTION_OUT) : NetVConnection() { netvc_context = context; }
   VIO *
-  do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf)
+  do_io_read(Continuation *c, int64_t nbytes, MIOBuffer *buf) override
   {
     return nullptr;
   };
   VIO *
-  do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *buf, bool owner = false)
+  do_io_write(Continuation *c, int64_t nbytes, IOBufferReader *buf, bool owner = false) override
   {
     return nullptr;
   };
-  void do_io_close(int lerrno = -1){};
-  void do_io_shutdown(ShutdownHowTo_t howto){};
-  void reenable(VIO *vio){};
-  void reenable_re(VIO *vio){};
-  void set_active_timeout(ink_hrtime timeout_in){};
-  void set_inactivity_timeout(ink_hrtime timeout_in){};
-  void cancel_active_timeout(){};
-  void cancel_inactivity_timeout(){};
-  void add_to_keep_alive_queue(){};
-  void remove_from_keep_alive_queue(){};
+  void do_io_close(int lerrno = -1) override{};
+  void do_io_shutdown(ShutdownHowTo_t howto) override{};
+  void reenable(VIO *vio) override{};
+  void reenable_re(VIO *vio) override{};
+  void set_active_timeout(ink_hrtime timeout_in) override{};
+  void set_inactivity_timeout(ink_hrtime timeout_in) override{};
+  void cancel_active_timeout() override{};
+  void cancel_inactivity_timeout() override{};
+  void add_to_keep_alive_queue() override{};
+  void remove_from_keep_alive_queue() override{};
   bool
-  add_to_active_queue()
+  add_to_active_queue() override
   {
     return true;
   };
   ink_hrtime
-  get_active_timeout()
+  get_active_timeout() override
   {
     return 0;
   }
   ink_hrtime
-  get_inactivity_timeout()
+  get_inactivity_timeout() override
   {
     return 0;
   }
   void
-  apply_options()
+  apply_options() override
   {
   }
   SOCKET
-  get_socket() { return 0; }
+  get_socket() override { return 0; }
   int
   set_tcp_init_cwnd(int init_cwnd)
   {
     return 0;
   }
   int
-  set_tcp_congestion_control(int side)
+  set_tcp_congestion_control(int side) override
   {
     return 0;
   }
-  void set_local_addr(){};
-  void set_remote_addr(){};
+  void set_local_addr() override{};
+  void set_remote_addr() override{};
 
   NetVConnectionContext_t
   get_context() const
diff --git a/plugins/esi/esi.cc b/plugins/esi/esi.cc
index 3b29f83ce..3eb18d2e4 100644
--- a/plugins/esi/esi.cc
+++ b/plugins/esi/esi.cc
@@ -169,13 +169,13 @@ class TSStatSystem : public StatSystem
 {
 public:
   void
-  create(int handle)
+  create(int handle) override
   {
     g_stat_indices[handle] = TSStatCreate(Stats::STAT_NAMES[handle], TS_RECORDDATATYPE_INT, TS_STAT_PERSISTENT, TS_STAT_SYNC_COUNT);
   }
 
   void
-  increment(int handle, int step = 1)
+  increment(int handle, int step = 1) override
   {
     TSStatIntIncrement(g_stat_indices[handle], step);
   }
diff --git a/plugins/esi/test/StubIncludeHandler.h b/plugins/esi/test/StubIncludeHandler.h
index 1b22e29fb..918ee46c8 100644
--- a/plugins/esi/test/StubIncludeHandler.h
+++ b/plugins/esi/test/StubIncludeHandler.h
@@ -34,14 +34,14 @@ public:
   {
   }
 
-  int handleInclude(const char *data, int data_len);
+  int handleInclude(const char *data, int data_len) override;
 
   bool parseCompleteCalled;
-  void handleParseComplete();
+  void handleParseComplete() override;
 
-  bool getData(int include_id, const char *&data, int &data_len);
+  bool getData(int include_id, const char *&data, int &data_len) override;
 
-  void getFooter(const char *&footer, int &footer_len);
+  void getFooter(const char *&footer, int &footer_len) override;
 
   ~StubIncludeHandler();
 
diff --git a/plugins/esi/test/TestHttpDataFetcher.h b/plugins/esi/test/TestHttpDataFetcher.h
index cd2ee5905..49f7d00e2 100644
--- a/plugins/esi/test/TestHttpDataFetcher.h
+++ b/plugins/esi/test/TestHttpDataFetcher.h
@@ -32,14 +32,14 @@ class TestHttpDataFetcher : public HttpDataFetcher
 public:
   TestHttpDataFetcher() {}
   bool
-  addFetchRequest(const std::string &url, FetchedDataProcessor *callback_obj = nullptr)
+  addFetchRequest(const std::string &url, FetchedDataProcessor *callback_obj = nullptr) override
   {
     ++_n_pending_requests;
     return true;
   }
 
   DataStatus
-  getRequestStatus(const std::string &url) const
+  getRequestStatus(const std::string &url) const override
   {
     if (_return_data) {
       return STATUS_DATA_AVAILABLE;
@@ -49,13 +49,13 @@ public:
   }
 
   int
-  getNumPendingRequests() const
+  getNumPendingRequests() const override
   {
     return _n_pending_requests;
   };
 
   bool
-  getContent(const std::string &url, const char *&content, int &content_len) const
+  getContent(const std::string &url, const char *&content, int &content_len) const override
   {
     TestHttpDataFetcher &curr_obj = const_cast<TestHttpDataFetcher &>(*this);
     --curr_obj._n_pending_requests;
diff --git a/plugins/experimental/parent_select/strategy.h b/plugins/experimental/parent_select/strategy.h
index e3cd47aa2..e2db4fcc2 100644
--- a/plugins/experimental/parent_select/strategy.h
+++ b/plugins/experimental/parent_select/strategy.h
@@ -244,24 +244,24 @@ public:
   PLNextHopSelectionStrategy(const std::string_view &name, const YAML::Node &n);
   virtual ~PLNextHopSelectionStrategy(){};
 
-  virtual void next(TSHttpTxn txnp, void *strategyTxn, const char *exclude_hostname, size_t exclude_hostname_len,
-                    in_port_t exclude_port, const char **out_hostname, size_t *out_hostname_len, in_port_t *out_port,
-                    bool *out_retry, bool *out_no_cache, time_t now = 0) = 0;
-  virtual void mark(TSHttpTxn txnp, void *strategyTxn, const char *hostname, const size_t hostname_len, const in_port_t port,
-                    const PLNHCmd status, const time_t now = 0)          = 0;
-  virtual bool nextHopExists(TSHttpTxn txnp);
-  virtual bool codeIsFailure(TSHttpStatus response_code);
-  virtual bool responseIsRetryable(unsigned int current_retry_attempts, TSHttpStatus response_code);
-  virtual bool onFailureMarkParentDown(TSHttpStatus response_code);
-  virtual bool goDirect();
-  virtual bool parentIsProxy();
-  virtual const char *
-  name()
+  void next(TSHttpTxn txnp, void *strategyTxn, const char *exclude_hostname, size_t exclude_hostname_len, in_port_t exclude_port,
+            const char **out_hostname, size_t *out_hostname_len, in_port_t *out_port, bool *out_retry, bool *out_no_cache,
+            time_t now = 0) override                             = 0;
+  void mark(TSHttpTxn txnp, void *strategyTxn, const char *hostname, const size_t hostname_len, const in_port_t port,
+            const PLNHCmd status, const time_t now = 0) override = 0;
+  bool nextHopExists(TSHttpTxn txnp) override;
+  bool codeIsFailure(TSHttpStatus response_code) override;
+  bool responseIsRetryable(unsigned int current_retry_attempts, TSHttpStatus response_code) override;
+  bool onFailureMarkParentDown(TSHttpStatus response_code) override;
+  bool goDirect() override;
+  bool parentIsProxy() override;
+  const char *
+  name() override
   {
     return strategy_name.c_str();
   };
-  virtual void *newTxn()              = 0;
-  virtual void deleteTxn(void *state) = 0;
+  void *newTxn() override              = 0;
+  void deleteTxn(void *state) override = 0;
 
 protected:
   std::string strategy_name;
diff --git a/plugins/experimental/webp_transform/ImageTransform.cc b/plugins/experimental/webp_transform/ImageTransform.cc
index 0ade23e3d..c74970718 100644
--- a/plugins/experimental/webp_transform/ImageTransform.cc
+++ b/plugins/experimental/webp_transform/ImageTransform.cc
@@ -25,7 +25,14 @@
 #include "tscpp/api/Logger.h"
 #include "tscpp/api/Stat.h"
 
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wsuggest-override"
+#endif
 #include <Magick++.h>
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
 
 using namespace Magick;
 using namespace atscppapi;
diff --git a/plugins/s3_auth/unit_tests/test_aws_auth_v4.h b/plugins/s3_auth/unit_tests/test_aws_auth_v4.h
index 42f415716..86dc566ba 100644
--- a/plugins/s3_auth/unit_tests/test_aws_auth_v4.h
+++ b/plugins/s3_auth/unit_tests/test_aws_auth_v4.h
@@ -77,36 +77,36 @@ class MockTsInterface : public TsInterface
 {
 public:
   const char *
-  getMethod(int *length)
+  getMethod(int *length) override
   {
     *length = _method.length();
     return _method.c_str();
   }
   const char *
-  getHost(int *length)
+  getHost(int *length) override
   {
     *length = _host.length();
     return _host.c_str();
   }
   const char *
-  getPath(int *length)
+  getPath(int *length) override
   {
     *length = _path.length();
     return _path.c_str();
   }
   const char *
-  getQuery(int *length)
+  getQuery(int *length) override
   {
     *length = _query.length();
     return _query.c_str();
   }
   HeaderIterator
-  headerBegin()
+  headerBegin() override
   {
     return HeaderIterator(_headers.begin());
   }
   HeaderIterator
-  headerEnd()
+  headerEnd() override
   {
     return HeaderIterator(_headers.end());
   }
diff --git a/proxy/http/remap/PluginDso.h b/proxy/http/remap/PluginDso.h
index b9661d457..c1390810f 100644
--- a/proxy/http/remap/PluginDso.h
+++ b/proxy/http/remap/PluginDso.h
@@ -87,8 +87,8 @@ public:
   virtual bool init(std::string &error)                             = 0;
   virtual void done()                                               = 0;
 
-  void acquire();
-  void release();
+  void acquire() override;
+  void release() override;
 
   void incInstanceCount();
   void decInstanceCount();
diff --git a/proxy/http/remap/unit-tests/test_PluginDso.cc b/proxy/http/remap/unit-tests/test_PluginDso.cc
index 2db5d1c43..5939b70a7 100644
--- a/proxy/http/remap/unit-tests/test_PluginDso.cc
+++ b/proxy/http/remap/unit-tests/test_PluginDso.cc
@@ -69,20 +69,20 @@ public:
   }
 
   virtual void
-  indicatePreReload()
+  indicatePreReload() override
   {
   }
   virtual void
-  indicatePostReload(TSRemapReloadStatus reloadStatus)
+  indicatePostReload(TSRemapReloadStatus reloadStatus) override
   {
   }
   virtual bool
-  init(std::string &error)
+  init(std::string &error) override
   {
     return true;
   }
   virtual void
-  done()
+  done() override
   {
   }
 };
diff --git a/proxy/http/remap/unit-tests/test_PluginFactory.cc b/proxy/http/remap/unit-tests/test_PluginFactory.cc
index 4cd3c25ff..0c0d3c96f 100644
--- a/proxy/http/remap/unit-tests/test_PluginFactory.cc
+++ b/proxy/http/remap/unit-tests/test_PluginFactory.cc
@@ -78,7 +78,7 @@ public:
 
 protected:
   const char *
-  getUuid()
+  getUuid() override
   {
     return _tempComponent.c_str();
   }
diff --git a/proxy/http3/Http3SessionAccept.h b/proxy/http3/Http3SessionAccept.h
index 5c872261a..d45331dda 100644
--- a/proxy/http3/Http3SessionAccept.h
+++ b/proxy/http3/Http3SessionAccept.h
@@ -43,8 +43,8 @@ public:
   explicit Http3SessionAccept(const HttpSessionAccept::Options &);
   ~Http3SessionAccept();
 
-  bool accept(NetVConnection *, MIOBuffer *, IOBufferReader *);
-  int mainEvent(int event, void *netvc);
+  bool accept(NetVConnection *, MIOBuffer *, IOBufferReader *) override;
+  int mainEvent(int event, void *netvc) override;
 
 private:
   Http3SessionAccept(const Http3SessionAccept &);
diff --git a/src/wccp/WccpLocal.h b/src/wccp/WccpLocal.h
index ee6f40e16..62765c63b 100644
--- a/src/wccp/WccpLocal.h
+++ b/src/wccp/WccpLocal.h
@@ -1700,13 +1700,13 @@ public:
   /// Force virtual destructor.
   virtual ~AltHashAssignComp() {}
   /// Fill out the component from an @c Assignment.
-  virtual self &fill(MsgBuffer &buffer,               ///< Target storage.
-                     detail::Assignment const &assign ///< Assignment data.
-  );
+  self &fill(MsgBuffer &buffer,               ///< Target storage.
+             detail::Assignment const &assign ///< Assignment data.
+             ) override;
 
   /// Validate an existing structure.
   /// @return Parse result.
-  virtual int parse(MsgBuffer &buffer);
+  int parse(MsgBuffer &buffer) override;
 
   /// Compute the total size of the component.
   static size_t calcSize(int n_routers, ///< Number of routers in view.
@@ -1733,13 +1733,13 @@ public:
   /// Force virtual destructor.
   virtual ~AltMaskAssignComp() {}
   /// Fill out the component from an @c Assignment.
-  virtual self &fill(MsgBuffer &buffer,               ///< Target storage.
-                     detail::Assignment const &assign ///< Assignment data.
-  );
+  self &fill(MsgBuffer &buffer,               ///< Target storage.
+             detail::Assignment const &assign ///< Assignment data.
+             ) override;
 
   /// Validate an existing structure.
   /// @return Parse result.
-  virtual int parse(MsgBuffer &buffer);
+  int parse(MsgBuffer &buffer) override;
 
 protected:
   MaskAssignElt *m_mask_elt; ///< Address of the mask assign element.
@@ -2485,18 +2485,17 @@ public:
   ts::Errata loadServicesFromFile(const char *path ///< Path to file.
   );
 
-  /// Override.
-  int open(uint32_t addr);
+  int open(uint32_t addr) override;
 
   /// Time until next scheduled event.
   time_t waitTime() const;
 
   /// Check for configuration.
-  bool isConfigured() const;
+  bool isConfigured() const override;
 
   /// Perform all scheduled housekeeping functions.
   /// @return 0 for success, -errno on error.
-  virtual int housekeeping();
+  int housekeeping() override;
 
   /** Check cache assignment reported by a router against internal assign.
       @return @c true if they are the same, @c false otherwise.
@@ -2520,13 +2519,13 @@ protected:
                               GroupData &group        ///< Group with data for message.
   );
   /// Process HERE_I_AM message.
-  virtual ts::Errata handleISeeYou(IpHeader const &header, ///< IP packet data.
-                                   ts::Buffer const &data  ///< Buffer with message data.
-  );
+  ts::Errata handleISeeYou(IpHeader const &header, ///< IP packet data.
+                           ts::Buffer const &data  ///< Buffer with message data.
+                           ) override;
   /// Process REMOVAL_QUERY message.
-  virtual ts::Errata handleRemovalQuery(IpHeader const &header, ///< IP packet data.
-                                        ts::Buffer const &data  ///< Message data.
-  );
+  ts::Errata handleRemovalQuery(IpHeader const &header, ///< IP packet data.
+                                ts::Buffer const &data  ///< Message data.
+                                ) override;
 
   /// Map Service Group ID to Service Group Data.
   typedef std::map<uint8_t, GroupData> GroupMap;
@@ -2632,15 +2631,15 @@ public:
   typedef detail::router::RouterBag RouterBag;
 
   /// Process HERE_I_AM message.
-  virtual ts::Errata handleHereIAm(IpHeader const &header, ///< IP packet data.
-                                   ts::Buffer const &data  ///< Buffer with message data.
-  );
+  ts::Errata handleHereIAm(IpHeader const &header, ///< IP packet data.
+                           ts::Buffer const &data  ///< Buffer with message data.
+                           ) override;
   /// Perform all scheduled housekeeping functions.
-  int housekeeping();
+  int housekeeping() override;
   /// Send pending I_SEE_YOU messages.
   int xmitISeeYou();
   /// Check for configuration.
-  bool isConfigured() const;
+  bool isConfigured() const override;
 
 protected:
   /** Find or create a service group record.