diff --git a/k4FWCore/include/k4FWCore/DataHandle.h b/k4FWCore/include/k4FWCore/DataHandle.h index b4a06adc..e4950cd2 100644 --- a/k4FWCore/include/k4FWCore/DataHandle.h +++ b/k4FWCore/include/k4FWCore/DataHandle.h @@ -90,9 +90,9 @@ template DataHandle::DataHandle(const std::string& descriptor, Gaudi::DataHandle::Mode a, IDataHandleHolder* fatherAlg) : DataObjectHandle>(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(m_eds.get()); + StatusCode sc [[maybe_unused]] = m_eds.retrieve(); + m_dataPtr = nullptr; + auto* podio_data_service = dynamic_cast(m_eds.get()); if (nullptr != podio_data_service) { if constexpr (std::is_integral_v || std::is_floating_point_v) { m_dataPtr = new T(); diff --git a/k4FWCore/include/k4FWCore/MetaDataHandle.h b/k4FWCore/include/k4FWCore/MetaDataHandle.h index 38fddcb2..75c54c20 100644 --- a/k4FWCore/include/k4FWCore/MetaDataHandle.h +++ b/k4FWCore/include/k4FWCore/MetaDataHandle.h @@ -57,8 +57,8 @@ template MetaDataHandle::~MetaDataHandle() {} template MetaDataHandle::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(m_eds.get()); + StatusCode sc [[maybe_unused]] = m_eds.retrieve(); + m_podio_data_service = dynamic_cast(m_eds.get()); checkPodioDataSvc(); } @@ -67,8 +67,8 @@ template MetaDataHandle::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(m_eds.get()); + StatusCode sc [[maybe_unused]] = m_eds.retrieve(); + m_podio_data_service = dynamic_cast(m_eds.get()); checkPodioDataSvc(); }