diff --git a/configure.ac b/configure.ac index e62097659a4..f022eb66f9e 100644 --- a/configure.ac +++ b/configure.ac @@ -874,7 +874,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" ]) @@ -915,7 +915,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/shared/rpc/RPCRequests.h b/include/shared/rpc/RPCRequests.h index 5ab5a7c1d56..fb8e378d3d5 100644 --- a/include/shared/rpc/RPCRequests.h +++ b/include/shared/rpc/RPCRequests.h @@ -133,7 +133,7 @@ struct RecordLookupRequest : ClientRequest { std::vector recTypes; }; std::string - get_method() const + get_method() const override { return "admin_lookup_records"; } diff --git a/include/tscore/PluginUserArgs.h b/include/tscore/PluginUserArgs.h index 4dd637b2158..b466829c1fb 100644 --- a/include/tscore/PluginUserArgs.h +++ b/include/tscore/PluginUserArgs.h @@ -86,7 +86,7 @@ template 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 @@ template class PluginUserArgs : public virtual PluginUserArgsM }; 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 97f1301b541..f1d50fd7e48 100644 --- a/iocore/cache/CacheTest.cc +++ b/iocore/cache/CacheTest.cc @@ -334,7 +334,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); @@ -347,18 +347,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; @@ -366,7 +367,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) @@ -389,7 +390,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 47f0cfd3bbe..40d797cdb18 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 95752dd21e0..3ca44db5506 100644 --- a/iocore/net/P_QUICNextProtocolAccept.h +++ b/iocore/net/P_QUICNextProtocolAccept.h @@ -33,7 +33,7 @@ class QUICNextProtocolAccept : public SessionAccept 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 @@ class QUICNextProtocolAccept : public SessionAccept 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 3185315dc6c..17cbf40c634 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 2120b29a2fb..e1ec1c4f1c5 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 1b22e29fb30..918ee46c844 100644 --- a/plugins/esi/test/StubIncludeHandler.h +++ b/plugins/esi/test/StubIncludeHandler.h @@ -34,14 +34,14 @@ class StubIncludeHandler : public EsiLib::SpecialIncludeHandler { } - 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 cd2ee590527..49f7d00e284 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 @@ class TestHttpDataFetcher : public HttpDataFetcher } 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(*this); --curr_obj._n_pending_requests; diff --git a/plugins/experimental/parent_select/strategy.h b/plugins/experimental/parent_select/strategy.h index 6a8a6b6b6fe..844e75a7a7f 100644 --- a/plugins/experimental/parent_select/strategy.h +++ b/plugins/experimental/parent_select/strategy.h @@ -245,24 +245,24 @@ class PLNextHopSelectionStrategy : public TSNextHopSelectionStrategy virtual ~PLNextHopSelectionStrategy(){}; bool Init(const YAML::Node &n); - 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 0ade23e3d88..c7497071832 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 +#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 42f41571633..86dc566bab5 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 9e6df2d1a74..96e9dd8bbc7 100644 --- a/proxy/http/remap/PluginDso.h +++ b/proxy/http/remap/PluginDso.h @@ -87,8 +87,8 @@ class PluginDso : public PluginThreadContext 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 2db5d1c43fe..5939b70a733 100644 --- a/proxy/http/remap/unit-tests/test_PluginDso.cc +++ b/proxy/http/remap/unit-tests/test_PluginDso.cc @@ -69,20 +69,20 @@ class PluginDsoUnitTest : public PluginDso } 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 4cd3c25ff8a..0c0d3c96f62 100644 --- a/proxy/http/remap/unit-tests/test_PluginFactory.cc +++ b/proxy/http/remap/unit-tests/test_PluginFactory.cc @@ -78,7 +78,7 @@ class PluginFactoryUnitTest : public PluginFactory protected: const char * - getUuid() + getUuid() override { return _tempComponent.c_str(); } diff --git a/proxy/http3/Http3SessionAccept.h b/proxy/http3/Http3SessionAccept.h index 5c872261a37..d45331dda7e 100644 --- a/proxy/http3/Http3SessionAccept.h +++ b/proxy/http3/Http3SessionAccept.h @@ -43,8 +43,8 @@ class Http3SessionAccept : public SessionAccept 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/traffic_ctl_jsonrpc/CtrlCommands.h b/src/traffic_ctl_jsonrpc/CtrlCommands.h index 5c6a7cea392..7943b3ef926 100644 --- a/src/traffic_ctl_jsonrpc/CtrlCommands.h +++ b/src/traffic_ctl_jsonrpc/CtrlCommands.h @@ -86,7 +86,7 @@ class RecordCommand : public CtrlCommand /// @brief RecordCommand constructor. RecordCommand(ts::Arguments args); /// @brief We will override this function as we want to call execute_subcommand() in the derived class. - void execute(); + void execute() override; protected: /// @brief Handy enum to hold which kind of records we are requesting. @@ -118,7 +118,7 @@ class ConfigCommand : public RecordCommand public: ConfigCommand(ts::Arguments args); - void execute_subcommand(); + void execute_subcommand() override; }; // ----------------------------------------------------------------------------------------------------------------------------------- class MetricCommand : public RecordCommand @@ -131,7 +131,7 @@ class MetricCommand : public RecordCommand public: MetricCommand(ts::Arguments args); - void execute_subcommand(); + void execute_subcommand() override; }; // ----------------------------------------------------------------------------------------------------------------------------------- class HostCommand : public CtrlCommand diff --git a/src/traffic_ctl_jsonrpc/jsonrpc/CtrlRPCRequests.h b/src/traffic_ctl_jsonrpc/jsonrpc/CtrlRPCRequests.h index b4466ab5538..4abcdddce9a 100644 --- a/src/traffic_ctl_jsonrpc/jsonrpc/CtrlRPCRequests.h +++ b/src/traffic_ctl_jsonrpc/jsonrpc/CtrlRPCRequests.h @@ -43,7 +43,7 @@ struct GetAllRecordsRequest : shared::rpc::RecordLookupRequest { /// struct ConfigReloadRequest : shared::rpc::ClientRequest { std::string - get_method() const + get_method() const override { return "admin_config_reload"; } @@ -54,7 +54,7 @@ struct ConfigReloadRequest : shared::rpc::ClientRequest { /// struct ConfigShowFileRegistryRequest : shared::rpc::ClientRequest { std::string - get_method() const + get_method() const override { return "filemanager.get_files_registry"; } @@ -65,7 +65,7 @@ struct ConfigShowFileRegistryRequest : shared::rpc::ClientRequest { /// struct ClearAllMetricRequest : shared::rpc::ClientRequest { std::string - get_method() const + get_method() const override { return "admin_clear_all_metrics_records"; } @@ -81,7 +81,7 @@ struct ClearMetricRequest : shared::rpc::ClientRequest { }; ClearMetricRequest(Params p) { super::params = p; } std::string - get_method() const + get_method() const override { return "admin_clear_metrics_records"; } @@ -95,7 +95,7 @@ struct ConfigSetRecordRequest : shared::rpc::ClientRequest { using super = shared::rpc::ClientRequest; ConfigSetRecordRequest(Params d) { super::params.push_back(d); } std::string - get_method() const + get_method() const override { return "admin_config_set_records"; } @@ -123,7 +123,7 @@ struct HostSetStatusRequest : shared::rpc::ClientRequest { HostSetStatusRequest(Params p) { super::params = p; } std::string - get_method() const + get_method() const override { return "admin_host_set_status"; } @@ -143,7 +143,7 @@ struct BasicPluginMessageRequest : shared::rpc::ClientRequest { }; BasicPluginMessageRequest(Params p) { super::params = p; } std::string - get_method() const + get_method() const override { return "admin_plugin_send_basic_msg"; } @@ -160,7 +160,7 @@ struct ServerStartDrainRequest : shared::rpc::ClientRequest { super::params = p; } std::string - get_method() const + get_method() const override { return "admin_server_start_drain"; } @@ -169,7 +169,7 @@ struct ServerStartDrainRequest : shared::rpc::ClientRequest { struct ServerStopDrainRequest : shared::rpc::ClientRequest { using super = ServerStopDrainRequest; std::string - get_method() const + get_method() const override { return "admin_server_start_drain"; } @@ -182,7 +182,7 @@ struct SetStorageDeviceOfflineRequest : shared::rpc::ClientRequest { }; SetStorageDeviceOfflineRequest(Params p) { super::params = p; } std::string - get_method() const + get_method() const override { return "admin_storage_set_device_offline"; } @@ -196,7 +196,7 @@ struct GetStorageDeviceStatusRequest : shared::rpc::ClientRequest { }; GetStorageDeviceStatusRequest(Params p) { super::params = p; } std::string - get_method() const + get_method() const override { return "admin_storage_get_device_status"; } @@ -215,7 +215,7 @@ struct DeviceStatusInfoResponse { struct ShowRegisterHandlersRequest : shared::rpc::ClientRequest { using super = shared::rpc::ClientRequest; std::string - get_method() const + get_method() const override { return "show_registered_handlers"; } diff --git a/src/wccp/WccpLocal.h b/src/wccp/WccpLocal.h index 7e173ab7c6d..937cab68146 100644 --- a/src/wccp/WccpLocal.h +++ b/src/wccp/WccpLocal.h @@ -1700,13 +1700,13 @@ class AltHashAssignComp : public AltAssignComp /// 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 @@ class AltMaskAssignComp : public AltAssignComp /// 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 @@ class CacheImpl : public Impl 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 @@ class CacheImpl : public Impl 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 GroupMap; @@ -2632,15 +2631,15 @@ class RouterImpl : public Impl 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.