Skip to content

Commit

Permalink
Add a few [[maybe_unused]]
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Feb 29, 2024
1 parent 54f9d47 commit 267366c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions k4FWCore/include/k4FWCore/DataHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ template <typename T>
DataHandle<T>::DataHandle(const std::string& descriptor, Gaudi::DataHandle::Mode a, IDataHandleHolder* fatherAlg)
: DataObjectHandle<DataWrapper<T>>(descriptor, a, fatherAlg), m_eds("EventDataSvc", "DataHandle") {
if (a == Gaudi::DataHandle::Writer) {
StatusCode sc = m_eds.retrieve();
m_dataPtr = nullptr;
auto* podio_data_service = dynamic_cast<PodioDataSvc*>(m_eds.get());
StatusCode sc [[maybe_unused]] = m_eds.retrieve();
m_dataPtr = nullptr;
auto* podio_data_service = dynamic_cast<PodioDataSvc*>(m_eds.get());
if (nullptr != podio_data_service) {
if constexpr (std::is_integral_v<T> || std::is_floating_point_v<T>) {
m_dataPtr = new T();
Expand Down
8 changes: 4 additions & 4 deletions k4FWCore/include/k4FWCore/MetaDataHandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ template <typename T> MetaDataHandle<T>::~MetaDataHandle() {}
template <typename T>
MetaDataHandle<T>::MetaDataHandle(const std::string& descriptor, Gaudi::DataHandle::Mode a)
: m_eds("EventDataSvc", "DataHandle"), m_descriptor(descriptor), m_mode(a) {
StatusCode sc = m_eds.retrieve();
m_podio_data_service = dynamic_cast<PodioDataSvc*>(m_eds.get());
StatusCode sc [[maybe_unused]] = m_eds.retrieve();
m_podio_data_service = dynamic_cast<PodioDataSvc*>(m_eds.get());
checkPodioDataSvc();
}

Expand All @@ -67,8 +67,8 @@ template <typename T>
MetaDataHandle<T>::MetaDataHandle(const Gaudi::DataHandle& handle, const std::string& descriptor,
Gaudi::DataHandle::Mode a)
: m_eds("EventDataSvc", "DataHandle"), m_descriptor(descriptor), m_dataHandle(&handle), m_mode(a) {
StatusCode sc = m_eds.retrieve();
m_podio_data_service = dynamic_cast<PodioDataSvc*>(m_eds.get());
StatusCode sc [[maybe_unused]] = m_eds.retrieve();
m_podio_data_service = dynamic_cast<PodioDataSvc*>(m_eds.get());
checkPodioDataSvc();
}

Expand Down

0 comments on commit 267366c

Please sign in to comment.