Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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"
])
Expand Down Expand Up @@ -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], [
Expand Down
2 changes: 1 addition & 1 deletion include/shared/rpc/RPCRequests.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ struct RecordLookupRequest : ClientRequest {
std::vector<int> recTypes;
};
std::string
get_method() const
get_method() const override
{
return "admin_lookup_records";
}
Expand Down
4 changes: 2 additions & 2 deletions include/tscore/PluginUserArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -95,7 +95,7 @@ template <TSUserArgType I> 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);
Expand Down
31 changes: 16 additions & 15 deletions iocore/cache/CacheTest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -347,26 +347,27 @@ 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;
replace_test.key = replace_write_test.key;
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)
Expand All @@ -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;
});
Expand Down
4 changes: 2 additions & 2 deletions iocore/cache/P_CacheTest.h
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand All @@ -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); \
} \
Expand Down
4 changes: 2 additions & 2 deletions iocore/net/P_QUICNextProtocolAccept.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
64 changes: 32 additions & 32 deletions iocore/net/quic/Mock.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions plugins/esi/esi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions plugins/esi/test/StubIncludeHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
8 changes: 4 additions & 4 deletions plugins/esi/test/TestHttpDataFetcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<TestHttpDataFetcher &>(*this);
--curr_obj._n_pending_requests;
Expand Down
Loading