From 83fb5393b83234b0fbdb3e3d3dbe7929a61a4f0b Mon Sep 17 00:00:00 2001 From: Juan Miguel Carceller <22276694+jmcarcell@users.noreply.github.com> Date: Fri, 15 Mar 2024 08:40:59 +0100 Subject: [PATCH] Fix a few compiler warnings about unused status code (#184) --- k4FWCore/include/k4FWCore/DataHandle.h | 2 +- k4FWCore/include/k4FWCore/MetaDataHandle.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/k4FWCore/include/k4FWCore/DataHandle.h b/k4FWCore/include/k4FWCore/DataHandle.h index b4a06adc..bea0ff5a 100644 --- a/k4FWCore/include/k4FWCore/DataHandle.h +++ b/k4FWCore/include/k4FWCore/DataHandle.h @@ -90,7 +90,7 @@ 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_eds.retrieve().ignore(); m_dataPtr = nullptr; auto* podio_data_service = dynamic_cast(m_eds.get()); if (nullptr != podio_data_service) { diff --git a/k4FWCore/include/k4FWCore/MetaDataHandle.h b/k4FWCore/include/k4FWCore/MetaDataHandle.h index 38fddcb2..17aa1e87 100644 --- a/k4FWCore/include/k4FWCore/MetaDataHandle.h +++ b/k4FWCore/include/k4FWCore/MetaDataHandle.h @@ -57,7 +57,7 @@ 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_eds.retrieve().ignore(); m_podio_data_service = dynamic_cast(m_eds.get()); checkPodioDataSvc(); } @@ -67,7 +67,7 @@ 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_eds.retrieve().ignore(); m_podio_data_service = dynamic_cast(m_eds.get()); checkPodioDataSvc(); }