From dffb4c71c3d35ccc39a20ecdf83d178ff9057254 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Thu, 27 Jan 2022 16:07:55 +0100 Subject: [PATCH] HGTD_GeoModel: Fix warnings seen when LTO is enabled. Uninitialized pointer passed to SG::retrieve. --- .../HGTD_DetDescr/HGTD_GeoModel/src/HGTD_DetectorTool.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HighGranularityTimingDetector/HGTD_DetDescr/HGTD_GeoModel/src/HGTD_DetectorTool.cxx b/HighGranularityTimingDetector/HGTD_DetDescr/HGTD_GeoModel/src/HGTD_DetectorTool.cxx index 8219e985777b..788eb53d3162 100644 --- a/HighGranularityTimingDetector/HGTD_DetDescr/HGTD_GeoModel/src/HGTD_DetectorTool.cxx +++ b/HighGranularityTimingDetector/HGTD_DetDescr/HGTD_GeoModel/src/HGTD_DetectorTool.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration */ // includes @@ -43,7 +43,7 @@ StatusCode HGTD_DetectorTool::create() { ATH_CHECK(detStore()->retrieve(idHelper, "HGTD_ID")); m_athenaComps.setIdHelper(idHelper); - GeoModelExperiment *theExpt; + GeoModelExperiment *theExpt = nullptr; ATH_CHECK(detStore()->retrieve(theExpt, "ATLAS")); // The * converts a ConstPVLink to a ref to a GeoVPhysVol, the & takes the address of the GeoVPhysVol -- GitLab