mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
Fixes #160 ("More GCC suggest-override warnings").
This commit is contained in:
@@ -6808,6 +6808,7 @@ thank them:
|
||||
[section:release_notes_boost_1_79_00 Boost 1.79 Release]
|
||||
|
||||
* Fixed bugs:
|
||||
* [@https://github.com/boostorg/interprocess/issues/160 GitHub #160 (['"More GCC suggest-override warnings"])].
|
||||
* [@https://github.com/boostorg/interprocess/pull/162 GitHub #162 (['"Fix missing sys/stat.h include on musl-based systems"])].
|
||||
|
||||
[endsect]
|
||||
|
||||
@@ -54,14 +54,14 @@ struct placement_destroy : public in_place_interface
|
||||
: in_place_interface(::boost::container::dtl::alignment_of<T>::value, sizeof(T), typeid(T).name())
|
||||
{}
|
||||
|
||||
virtual void destroy_n(void *mem, std::size_t num, std::size_t &destroyed)
|
||||
virtual void destroy_n(void *mem, std::size_t num, std::size_t &destroyed) BOOST_OVERRIDE
|
||||
{
|
||||
T* memory = static_cast<T*>(mem);
|
||||
for(destroyed = 0; destroyed < num; ++destroyed)
|
||||
(memory++)->~T();
|
||||
}
|
||||
|
||||
virtual void construct_n(void *, std::size_t, std::size_t &) {}
|
||||
virtual void construct_n(void *, std::size_t, std::size_t &) BOOST_OVERRIDE {}
|
||||
|
||||
private:
|
||||
void destroy(void *mem)
|
||||
|
||||
@@ -126,7 +126,7 @@ class basic_managed_multi_shared_memory
|
||||
group_services(frontend_t *const frontend)
|
||||
: mp_frontend(frontend), m_group(0), m_min_segment_size(0){}
|
||||
|
||||
virtual std::pair<void *, size_type> create_new_segment(size_type alloc_size)
|
||||
virtual std::pair<void *, size_type> create_new_segment(size_type alloc_size) BOOST_OVERRIDE
|
||||
{ (void)alloc_size;
|
||||
/*
|
||||
//We should allocate an extra byte so that the
|
||||
@@ -144,10 +144,10 @@ class basic_managed_multi_shared_memory
|
||||
return result_type(static_cast<void *>(0), 0);
|
||||
}
|
||||
|
||||
virtual bool update_segments ()
|
||||
virtual bool update_segments BOOST_OVERRIDE ()
|
||||
{ return true; }
|
||||
|
||||
virtual ~group_services(){}
|
||||
virtual ~group_services() BOOST_OVERRIDE{}
|
||||
|
||||
void set_group(segment_group_id group)
|
||||
{ m_group = group; }
|
||||
|
||||
@@ -66,7 +66,7 @@ struct CtorArgN : public placement_destroy<T>
|
||||
|
||||
virtual void construct_n(void *mem
|
||||
, std::size_t num
|
||||
, std::size_t &constructed)
|
||||
, std::size_t &constructed) BOOST_OVERRIDE
|
||||
{
|
||||
T* memory = static_cast<T*>(mem);
|
||||
for(constructed = 0; constructed < num; ++constructed){
|
||||
@@ -200,7 +200,7 @@ struct CtorArg##N : placement_destroy<T>\
|
||||
CtorArg##N ( BOOST_MOVE_UREF##N )\
|
||||
BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N{}\
|
||||
\
|
||||
virtual void construct_n(void *mem, std::size_t num, std::size_t &constructed)\
|
||||
virtual void construct_n(void *mem, std::size_t num, std::size_t &constructed) BOOST_OVERRIDE\
|
||||
{\
|
||||
T* memory = static_cast<T*>(mem);\
|
||||
for(constructed = 0; constructed < num; ++constructed){\
|
||||
@@ -230,7 +230,7 @@ struct CtorIt##N : public placement_destroy<T>\
|
||||
CtorIt##N ( BOOST_MOVE_VAL##N )\
|
||||
BOOST_MOVE_COLON##N BOOST_MOVE_VAL_INIT##N{}\
|
||||
\
|
||||
virtual void construct_n(void *mem, std::size_t num, std::size_t &constructed)\
|
||||
virtual void construct_n(void *mem, std::size_t num, std::size_t &constructed) BOOST_OVERRIDE\
|
||||
{\
|
||||
T* memory = static_cast<T*>(mem);\
|
||||
for(constructed = 0; constructed < num; ++constructed){\
|
||||
|
||||
@@ -601,7 +601,7 @@ class launch_thread_impl
|
||||
: f_( f )
|
||||
{}
|
||||
|
||||
void run()
|
||||
virtual void run() BOOST_OVERRIDE
|
||||
{ f_(); }
|
||||
|
||||
private:
|
||||
|
||||
@@ -36,7 +36,7 @@ class bad_weak_ptr
|
||||
{
|
||||
public:
|
||||
|
||||
virtual char const * what() const BOOST_NOEXCEPT_OR_NOTHROW
|
||||
virtual char const * what() const BOOST_NOEXCEPT_OR_NOTHROW BOOST_OVERRIDE
|
||||
{ return "boost::interprocess::bad_weak_ptr"; }
|
||||
};
|
||||
|
||||
|
||||
@@ -88,7 +88,7 @@ class basic_bufferbuf
|
||||
: basic_streambuf_t(), m_mode(mode), m_buffer(buf), m_length(length)
|
||||
{ this->set_pointers(); }
|
||||
|
||||
virtual ~basic_bufferbuf(){}
|
||||
virtual ~basic_bufferbuf() BOOST_OVERRIDE {}
|
||||
|
||||
public:
|
||||
//!Returns the pointer and size of the internal buffer.
|
||||
@@ -115,14 +115,14 @@ class basic_bufferbuf
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual int_type underflow()
|
||||
virtual int_type underflow() BOOST_OVERRIDE
|
||||
{
|
||||
// Precondition: gptr() >= egptr(). Returns a character, if available.
|
||||
return this->gptr() != this->egptr() ?
|
||||
CharTraits::to_int_type(*this->gptr()) : CharTraits::eof();
|
||||
}
|
||||
|
||||
virtual int_type pbackfail(int_type c = CharTraits::eof())
|
||||
virtual int_type pbackfail(int_type c = CharTraits::eof()) BOOST_OVERRIDE
|
||||
{
|
||||
if(this->gptr() != this->eback()) {
|
||||
if(!CharTraits::eq_int_type(c, CharTraits::eof())) {
|
||||
@@ -147,7 +147,7 @@ class basic_bufferbuf
|
||||
return CharTraits::eof();
|
||||
}
|
||||
|
||||
virtual int_type overflow(int_type c = CharTraits::eof())
|
||||
virtual int_type overflow(int_type c = CharTraits::eof()) BOOST_OVERRIDE
|
||||
{
|
||||
if(m_mode & std::ios_base::out) {
|
||||
if(!CharTraits::eq_int_type(c, CharTraits::eof())) {
|
||||
@@ -181,7 +181,7 @@ class basic_bufferbuf
|
||||
|
||||
virtual pos_type seekoff(off_type off, std::ios_base::seekdir dir,
|
||||
std::ios_base::openmode mode
|
||||
= std::ios_base::in | std::ios_base::out)
|
||||
= std::ios_base::in | std::ios_base::out) BOOST_OVERRIDE
|
||||
{
|
||||
bool in = false;
|
||||
bool out = false;
|
||||
@@ -246,7 +246,7 @@ class basic_bufferbuf
|
||||
}
|
||||
|
||||
virtual pos_type seekpos(pos_type pos, std::ios_base::openmode mode
|
||||
= std::ios_base::in | std::ios_base::out)
|
||||
= std::ios_base::in | std::ios_base::out) BOOST_OVERRIDE
|
||||
{ return seekoff(pos - pos_type(off_type(0)), std::ios_base::beg, mode); }
|
||||
|
||||
private:
|
||||
|
||||
@@ -214,7 +214,7 @@ class basic_vectorbuf
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual int_type underflow()
|
||||
virtual int_type underflow() BOOST_OVERRIDE
|
||||
{
|
||||
if (base_t::gptr() == 0)
|
||||
return CharTraits::eof();
|
||||
@@ -229,7 +229,7 @@ class basic_vectorbuf
|
||||
return CharTraits::eof();
|
||||
}
|
||||
|
||||
virtual int_type pbackfail(int_type c = CharTraits::eof())
|
||||
virtual int_type pbackfail(int_type c = CharTraits::eof()) BOOST_OVERRIDE
|
||||
{
|
||||
if(this->gptr() != this->eback()) {
|
||||
if(!CharTraits::eq_int_type(c, CharTraits::eof())) {
|
||||
@@ -254,7 +254,7 @@ class basic_vectorbuf
|
||||
return CharTraits::eof();
|
||||
}
|
||||
|
||||
virtual int_type overflow(int_type c = CharTraits::eof())
|
||||
virtual int_type overflow(int_type c = CharTraits::eof()) BOOST_OVERRIDE
|
||||
{
|
||||
if(m_mode & std::ios_base::out) {
|
||||
if(!CharTraits::eq_int_type(c, CharTraits::eof())) {
|
||||
@@ -289,7 +289,7 @@ class basic_vectorbuf
|
||||
|
||||
virtual pos_type seekoff(off_type off, std::ios_base::seekdir dir,
|
||||
std::ios_base::openmode mode
|
||||
= std::ios_base::in | std::ios_base::out)
|
||||
= std::ios_base::in | std::ios_base::out) BOOST_OVERRIDE
|
||||
{
|
||||
//Get seek mode
|
||||
bool in(0 != (mode & std::ios_base::in)), out(0 != (mode & std::ios_base::out));
|
||||
@@ -357,7 +357,7 @@ class basic_vectorbuf
|
||||
}
|
||||
|
||||
virtual pos_type seekpos(pos_type pos, std::ios_base::openmode mode
|
||||
= std::ios_base::in | std::ios_base::out)
|
||||
= std::ios_base::in | std::ios_base::out) BOOST_OVERRIDE
|
||||
{ return seekoff(pos - pos_type(off_type(0)), std::ios_base::beg, mode); }
|
||||
|
||||
private:
|
||||
|
||||
@@ -231,33 +231,33 @@ class winapi_named_condition_any
|
||||
: m_condition_data(cond_data)
|
||||
{}
|
||||
|
||||
virtual std::size_t get_data_size() const
|
||||
virtual std::size_t get_data_size() const BOOST_OVERRIDE
|
||||
{ return sizeof(sem_counts); }
|
||||
|
||||
virtual const void *buffer_with_final_data_to_file()
|
||||
virtual const void *buffer_with_final_data_to_file() BOOST_OVERRIDE
|
||||
{
|
||||
sem_counts[0] = m_condition_data.m_sem_block_queue.value();
|
||||
sem_counts[1] = m_condition_data.m_sem_block_lock.value();
|
||||
return &sem_counts;
|
||||
}
|
||||
|
||||
virtual const void *buffer_with_init_data_to_file()
|
||||
virtual const void *buffer_with_init_data_to_file() BOOST_OVERRIDE
|
||||
{
|
||||
sem_counts[0] = 0;
|
||||
sem_counts[1] = 1;
|
||||
return &sem_counts;
|
||||
}
|
||||
|
||||
virtual void *buffer_to_store_init_data_from_file()
|
||||
virtual void *buffer_to_store_init_data_from_file() BOOST_OVERRIDE
|
||||
{ return &sem_counts; }
|
||||
|
||||
virtual bool open(create_enum_t op, const char *id_name)
|
||||
virtual bool open(create_enum_t op, const char *id_name) BOOST_OVERRIDE
|
||||
{ return this->open_impl(op, id_name); }
|
||||
|
||||
virtual bool open(create_enum_t op, const wchar_t *id_name)
|
||||
virtual bool open(create_enum_t op, const wchar_t *id_name) BOOST_OVERRIDE
|
||||
{ return this->open_impl(op, id_name); }
|
||||
|
||||
virtual void close()
|
||||
virtual void close() BOOST_OVERRIDE
|
||||
{
|
||||
m_condition_data.m_sem_block_queue.close();
|
||||
m_condition_data.m_sem_block_lock.close();
|
||||
@@ -267,7 +267,7 @@ class winapi_named_condition_any
|
||||
m_condition_data.m_nwaiters_to_unblock = 0;
|
||||
}
|
||||
|
||||
virtual ~named_cond_callbacks()
|
||||
virtual ~named_cond_callbacks() BOOST_OVERRIDE
|
||||
{}
|
||||
|
||||
private:
|
||||
|
||||
@@ -90,19 +90,19 @@ class winapi_named_mutex
|
||||
: m_mtx_wrapper(mtx_wrapper)
|
||||
{}
|
||||
|
||||
virtual std::size_t get_data_size() const
|
||||
virtual std::size_t get_data_size() const BOOST_OVERRIDE
|
||||
{ return 0u; }
|
||||
|
||||
virtual const void *buffer_with_init_data_to_file()
|
||||
virtual const void *buffer_with_init_data_to_file() BOOST_OVERRIDE
|
||||
{ return 0; }
|
||||
|
||||
virtual const void *buffer_with_final_data_to_file()
|
||||
virtual const void *buffer_with_final_data_to_file() BOOST_OVERRIDE
|
||||
{ return 0; }
|
||||
|
||||
virtual void *buffer_to_store_init_data_from_file()
|
||||
virtual void *buffer_to_store_init_data_from_file() BOOST_OVERRIDE
|
||||
{ return 0; }
|
||||
|
||||
virtual bool open(create_enum_t, const char *id_name)
|
||||
virtual bool open(create_enum_t, const char *id_name) BOOST_OVERRIDE
|
||||
{
|
||||
std::string aux_str = "Global\\bipc.mut.";
|
||||
aux_str += id_name;
|
||||
@@ -112,7 +112,7 @@ class winapi_named_mutex
|
||||
return m_mtx_wrapper.open_or_create(aux_str.c_str(), mut_perm);
|
||||
}
|
||||
|
||||
virtual bool open(create_enum_t, const wchar_t *id_name)
|
||||
virtual bool open(create_enum_t, const wchar_t *id_name) BOOST_OVERRIDE
|
||||
{
|
||||
std::wstring aux_str = L"Global\\bipc.mut.";
|
||||
aux_str += id_name;
|
||||
@@ -122,12 +122,12 @@ class winapi_named_mutex
|
||||
return m_mtx_wrapper.open_or_create(aux_str.c_str(), mut_perm);
|
||||
}
|
||||
|
||||
virtual void close()
|
||||
virtual void close() BOOST_OVERRIDE
|
||||
{
|
||||
m_mtx_wrapper.close();
|
||||
}
|
||||
|
||||
virtual ~named_mut_callbacks()
|
||||
virtual ~named_mut_callbacks() BOOST_OVERRIDE
|
||||
{}
|
||||
|
||||
private:
|
||||
|
||||
@@ -81,19 +81,19 @@ class winapi_named_semaphore
|
||||
: m_sem_wrapper(sem_wrapper), m_sem_count(sem_cnt)
|
||||
{}
|
||||
|
||||
virtual std::size_t get_data_size() const
|
||||
virtual std::size_t get_data_size() const BOOST_OVERRIDE
|
||||
{ return sizeof(sem_count_t); }
|
||||
|
||||
virtual const void *buffer_with_final_data_to_file()
|
||||
virtual const void *buffer_with_final_data_to_file() BOOST_OVERRIDE
|
||||
{ return &m_sem_count; }
|
||||
|
||||
virtual const void *buffer_with_init_data_to_file()
|
||||
virtual const void *buffer_with_init_data_to_file() BOOST_OVERRIDE
|
||||
{ return &m_sem_count; }
|
||||
|
||||
virtual void *buffer_to_store_init_data_from_file()
|
||||
virtual void *buffer_to_store_init_data_from_file() BOOST_OVERRIDE
|
||||
{ return &m_sem_count; }
|
||||
|
||||
virtual bool open(create_enum_t, const char *id_name)
|
||||
virtual bool open(create_enum_t, const char *id_name) BOOST_OVERRIDE
|
||||
{
|
||||
std::string aux_str = "Global\\bipc.sem.";
|
||||
aux_str += id_name;
|
||||
@@ -106,7 +106,7 @@ class winapi_named_semaphore
|
||||
, winapi_semaphore_wrapper::MaxCount, sem_perm, created);
|
||||
}
|
||||
|
||||
virtual bool open(create_enum_t, const wchar_t *id_name)
|
||||
virtual bool open(create_enum_t, const wchar_t *id_name) BOOST_OVERRIDE
|
||||
{
|
||||
std::wstring aux_str = L"Global\\bipc.sem.";
|
||||
aux_str += id_name;
|
||||
@@ -119,12 +119,12 @@ class winapi_named_semaphore
|
||||
, winapi_semaphore_wrapper::MaxCount, sem_perm, created);
|
||||
}
|
||||
|
||||
virtual void close()
|
||||
virtual void close() BOOST_OVERRIDE
|
||||
{
|
||||
m_sem_wrapper.close();
|
||||
}
|
||||
|
||||
virtual ~named_sem_callbacks()
|
||||
virtual ~named_sem_callbacks() BOOST_OVERRIDE
|
||||
{}
|
||||
|
||||
private:
|
||||
|
||||
@@ -41,7 +41,7 @@ class derived_class
|
||||
: public base_class
|
||||
{
|
||||
public:
|
||||
virtual ~derived_class()
|
||||
virtual ~derived_class() BOOST_OVERRIDE
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -286,9 +286,9 @@ struct X
|
||||
struct Y: public X
|
||||
{
|
||||
Y(){ ++cnt; }
|
||||
virtual ~Y(){ --cnt; }
|
||||
virtual ~Y() BOOST_OVERRIDE{ --cnt; }
|
||||
|
||||
virtual int id() const
|
||||
virtual int id() const BOOST_OVERRIDE
|
||||
{ return 2; }
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user