Skip to content

Commit

Permalink
Fix hidden overloaded virtual methods (#4624)
Browse files Browse the repository at this point in the history
* Refs #20592: Fix hidden overloaded virtual methods

Signed-off-by: EduPonz <[email protected]>

* Refs #20679: Run Github Ubuntu CI on PRs

Signed-off-by: EduPonz <[email protected]>

* Refs #20679: Run CI on PRs to intermediate branches

Signed-off-by: EduPonz <[email protected]>

* Refs #20679: Correctly set concurrency group for Ubuntu CI

Signed-off-by: EduPonz <[email protected]>

* Refs #20679: Apply Miguel's suggestions

Signed-off-by: EduPonz <[email protected]>

---------

Signed-off-by: EduPonz <[email protected]>
  • Loading branch information
EduPonz authored Apr 4, 2024
1 parent 0dcc20b commit d14933d
Show file tree
Hide file tree
Showing 48 changed files with 143 additions and 18 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/address-sanitizers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ on:
default: '2.10.x'

pull_request:
branches:
- '2.10.x'
paths-ignore:
- '**.md'
- '**.txt'
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/documentation-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ on:
default: '2.10.x'

pull_request:
branches:
- '2.10.x'
paths-ignore:
- '**.md'
- '**.txt'
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/mac-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ on:
required: true

pull_request:
branches:
- '2.10.x'
paths-ignore:
- '**.md'
- '**.txt'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.meta
colcon_build_args: ${{ inputs.colcon-args }}
cmake_args: ${{ inputs.cmake-args }}
cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall"
cmake_args_default: -DCMAKE_CXX_FLAGS="-Werror -Wall -Wextra -Wpedantic -Wunused-value -Woverloaded-virtual" -DFASTDDS_EXAMPLE_TESTS=ON
cmake_build_type: ${{ matrix.cmake-build-type }}
workspace: ${{ github.workspace }}

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/thread-sanitizer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ on:
type: string

pull_request:
branches:
- '2.10.x'
paths-ignore:
- '**.md'
- '**.txt'
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ on:
type: string
required: true

pull_request:
paths-ignore:
- '**.md'
- '**.txt'
- '!**/CMakeLists.txt'

concurrency:
group: ${{ github.workflow }}
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ on:
required: true

pull_request:
branches:
- '2.10.x'
paths-ignore:
- '**.md'
- '**.txt'
Expand Down
6 changes: 6 additions & 0 deletions examples/cpp/dds/LivelinessQoS/LivelinessSubscriber.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,15 @@ class LivelinessSubscriber

class PartListener : public eprosima::fastdds::dds::DomainParticipantListener
{
public:

virtual void on_participant_discovery(
eprosima::fastdds::dds::DomainParticipant* participant,
eprosima::fastrtps::rtps::ParticipantDiscoveryInfo&& info) override;

private:

using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery;
};

PartListener part_listener_;
Expand Down
4 changes: 4 additions & 0 deletions examples/cpp/rtps/Persistent/TestReaderPersistent.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ class TestReaderPersistent

uint32_t n_received;
uint32_t n_matched;

private:

using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched;
}
m_listener;
};
Expand Down
4 changes: 4 additions & 0 deletions examples/cpp/rtps/Persistent/TestWriterPersistent.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ class TestWriterPersistent
}

int n_matched;

private:

using eprosima::fastrtps::rtps::WriterListener::onWriterMatched;
}
m_listener;
};
Expand Down
4 changes: 4 additions & 0 deletions examples/cpp/rtps/Registered/TestReaderRegistered.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ class TestReaderRegistered

uint32_t n_received;
uint32_t n_matched;

private:

using eprosima::fastrtps::rtps::ReaderListener::onReaderMatched;
}
m_listener;
};
Expand Down
4 changes: 4 additions & 0 deletions examples/cpp/rtps/Registered/TestWriterRegistered.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ class TestWriterRegistered
}

int n_matched;

private:

using eprosima::fastrtps::rtps::WriterListener::onWriterMatched;
}
m_listener;
};
Expand Down
3 changes: 3 additions & 0 deletions include/fastrtps/subscriber/SubscriberHistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ class SubscriberHistory : public rtps::ReaderHistory

private:

using rtps::ReaderHistory::completed_change;
using rtps::ReaderHistory::received_change;

using t_m_Inst_Caches = std::map<rtps::InstanceHandle_t, KeyedChanges>;

//!Map where keys are instance handles and values vectors of cache changes
Expand Down
5 changes: 5 additions & 0 deletions src/cpp/fastdds/domain/DomainParticipantImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,11 @@ class DomainParticipantImpl
DomainParticipantImpl* participant_;
int callback_counter_ = 0;

private:

using fastrtps::rtps::RTPSParticipantListener::onParticipantDiscovery;
using fastrtps::rtps::RTPSParticipantListener::onReaderDiscovery;
using fastrtps::rtps::RTPSParticipantListener::onWriterDiscovery;
}
rtps_listener_;

Expand Down
4 changes: 4 additions & 0 deletions src/cpp/fastdds/publisher/DataWriterImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ class DataWriterImpl : protected rtps::IReaderDataFilter
const fastrtps::rtps::ReaderProxyData* reader_info) override;

DataWriterImpl* data_writer_;

private:

using fastrtps::rtps::WriterListener::onWriterMatched;
}
writer_listener_;

Expand Down
4 changes: 4 additions & 0 deletions src/cpp/fastdds/subscriber/DataReaderImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@ class DataReaderImpl
const fastrtps::rtps::CacheChange_t* const change) override;

DataReaderImpl* data_reader_;

private:

using fastrtps::rtps::ReaderListener::onReaderMatched;
}
reader_listener_;

Expand Down
6 changes: 6 additions & 0 deletions src/cpp/fastrtps_deprecated/participant/ParticipantImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,12 @@ class ParticipantImpl

ParticipantImpl* mp_participantimpl;

private:

using rtps::RTPSParticipantListener::onParticipantDiscovery;
using rtps::RTPSParticipantListener::onReaderDiscovery;
using rtps::RTPSParticipantListener::onWriterDiscovery;

}
m_rtps_listener;

Expand Down
4 changes: 4 additions & 0 deletions src/cpp/fastrtps_deprecated/publisher/PublisherImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ class PublisherImpl
const LivelinessLostStatus& status) override;

PublisherImpl* mp_publisherImpl;

private:

using rtps::WriterListener::onWriterMatched;
}
m_writerListener;

Expand Down
4 changes: 4 additions & 0 deletions src/cpp/fastrtps_deprecated/subscriber/SubscriberImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@ class SubscriberImpl
rtps::RTPSReader* reader,
const LivelinessChangedStatus& status) override;
SubscriberImpl* mp_subscriberImpl;

private:

using rtps::ReaderListener::onReaderMatched;
}
m_readerListener;

Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/DataSharing/ReaderPool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,8 @@ class ReaderPool : public DataSharingPayloadPool

private:

using DataSharingPayloadPool::init_shared_memory;

bool is_volatile_; //< Whether the reader is volatile or not
uint64_t next_payload_; //< Index of the next history position to read
SequenceNumber_t last_sn_; //< Sequence number of the last read payload
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/DataSharing/WriterPool.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ class WriterPool : public DataSharingPayloadPool

private:

using DataSharingPayloadPool::init_shared_memory;

octet* payloads_pool_; //< Shared pool of payloads

uint32_t max_data_size_; //< Maximum size of the serialized payload data
Expand Down
4 changes: 2 additions & 2 deletions src/cpp/rtps/builtin/discovery/participant/PDPClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ class PDPClient : public PDP
*/
void announceParticipantState(
bool new_change,
bool dispose = false,
WriteParams& wparams = WriteParams::WRITE_PARAM_DEFAULT) override;
bool dispose,
WriteParams& wparams) override;

/**
* These methods wouldn't be needed under perfect server operation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ bool DSClientEvent::event()
// This marks to announceParticipantState that the announcement is only meant for missing servers,
// so it is not a periodic announcement
mp_PDP->_serverPing = true;
mp_PDP->announceParticipantState(false);
WriteParams __wp = WriteParams();
mp_PDP->announceParticipantState(false, false, __wp);
EPROSIMA_LOG_INFO(CLIENT_PDP_THREAD,
"Client " << mp_PDP->getRTPSParticipant()->getGuid() << " PDP announcement");
}
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/history/BasicPayloadPool_impl/Base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

class BaseImpl : public IPayloadPool
{
public:

bool get_payload(
uint32_t size,
CacheChange_t& cache_change) override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ class Impl<PREALLOCATED_WITH_REALLOC_MEMORY_MODE> : public BaseImpl

private:

using BaseImpl::get_payload;

uint32_t min_payload_size_;
};
4 changes: 4 additions & 0 deletions src/cpp/rtps/history/TopicPayloadPool_impl/Dynamic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ class DynamicTopicPayloadPool : public TopicPayloadPool
return DYNAMIC_RESERVE_MEMORY_MODE;
}

private:

using TopicPayloadPool::get_payload;

};

} // namespace rtps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class DynamicReusableTopicPayloadPool : public TopicPayloadPool
return DYNAMIC_REUSABLE_MEMORY_MODE;
}

private:

using TopicPayloadPool::get_payload;

};

} // namespace rtps
Expand Down
2 changes: 2 additions & 0 deletions src/cpp/rtps/history/TopicPayloadPool_impl/Preallocated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class PreallocatedTopicPayloadPool : public TopicPayloadPool

private:

using TopicPayloadPool::get_payload;

uint32_t payload_size_;
uint32_t minimum_pool_size_; //< Minimum initial pool size (sum of all histories)
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ class PreallocatedReallocTopicPayloadPool : public TopicPayloadPool

private:

using TopicPayloadPool::get_payload;

uint32_t min_payload_size_;
uint32_t minimum_pool_size_; //< Minimum initial pool size (sum of all histories)
};
Expand Down
2 changes: 2 additions & 0 deletions test/blackbox/api/dds-pim/PubSubParticipant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ class PubSubParticipant

private:

using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery;

ParticipantListener& operator =(
const ParticipantListener&) = delete;
PubSubParticipant* participant_;
Expand Down
3 changes: 3 additions & 0 deletions test/blackbox/api/dds-pim/PubSubReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ class PubSubReader

private:

using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery;
using eprosima::fastdds::dds::DomainParticipantListener::on_publisher_discovery;

ParticipantListener& operator =(
const ParticipantListener&) = delete;
PubSubReader& reader_;
Expand Down
4 changes: 4 additions & 0 deletions test/blackbox/api/dds-pim/PubSubWriter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ class PubSubWriter

private:

using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery;
using eprosima::fastdds::dds::DomainParticipantListener::on_publisher_discovery;
using eprosima::fastdds::dds::DomainParticipantListener::on_subscriber_discovery;

ParticipantListener& operator =(
const ParticipantListener&) = delete;

Expand Down
4 changes: 4 additions & 0 deletions test/blackbox/api/dds-pim/PubSubWriterReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,10 @@ class PubSubWriterReader

private:

using eprosima::fastdds::dds::DomainParticipantListener::on_participant_discovery;
using eprosima::fastdds::dds::DomainParticipantListener::on_publisher_discovery;
using eprosima::fastdds::dds::DomainParticipantListener::on_subscriber_discovery;

//! Mutex guarding all info collections
mutable std::mutex info_mutex_;
//! The discovered participants excluding the participant this listener is listening to
Expand Down
7 changes: 6 additions & 1 deletion test/blackbox/common/DDSBlackboxTestsBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,8 +477,10 @@ TEST(DDSBasic, PidRelatedSampleIdentity)
TEST(DDSBasic, IgnoreParticipant)
{

struct IgnoringDomainParticipantListener : public DomainParticipantListener
class IgnoringDomainParticipantListener : public DomainParticipantListener
{
public:

std::atomic_int num_matched{0};
std::atomic_int num_ignored{0};

Expand All @@ -505,6 +507,9 @@ TEST(DDSBasic, IgnoreParticipant)
}
}

private:

using DomainParticipantListener::on_participant_discovery;
};
// Set DomainParticipantFactory to create disabled entities
DomainParticipantFactoryQos factory_qos;
Expand Down
9 changes: 9 additions & 0 deletions test/blackbox/common/DDSBlackboxTestsDiscovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ TEST(DDSDiscovery, ParticipantProxyPhysicalData)

private:

using DomainParticipantListener::on_participant_discovery;

std::condition_variable* cv_;

std::mutex* mtx_;
Expand Down Expand Up @@ -616,6 +618,9 @@ TEST(DDSDiscovery, DDSDiscoveryDoesNotDropUDPLocator)
}
}

private:

using DomainParticipantListener::on_participant_discovery;
};

DomainParticipantFactory* factory = DomainParticipantFactory::get_instance();
Expand Down Expand Up @@ -1664,6 +1669,10 @@ TEST(DDSDiscovery, DataracePDP)

std::promise<void> undiscovery_promise;
std::future<void> undiscovery_future;

private:

using DomainParticipantListener::on_participant_discovery;
};

// Disable intraprocess
Expand Down
Loading

0 comments on commit d14933d

Please sign in to comment.