From 1b2ba304de3831097541f220f1ab6212fd8dd650 Mon Sep 17 00:00:00 2001 From: Markus Frank <Markus.Frank@cern.ch> Date: Sat, 9 Jul 2022 11:11:01 +0200 Subject: [PATCH] Fix build warnings --- DDCore/src/Conditions.cpp | 36 ++++++++++----------- DDG4/plugins/Geant4ScintillationPhysics.cpp | 2 +- DDTest/src/test_Evaluator.cc | 7 ++-- 3 files changed, 24 insertions(+), 21 deletions(-) diff --git a/DDCore/src/Conditions.cpp b/DDCore/src/Conditions.cpp index 93d694a1f..eb4b66c3b 100644 --- a/DDCore/src/Conditions.cpp +++ b/DDCore/src/Conditions.cpp @@ -221,9 +221,9 @@ ConditionsSelect::~ConditionsSelect() { /// Constructor from string ConditionKey::KeyMaker::KeyMaker(DetElement detector, const string& value) { - KeyMaker m(detector.key(), detail::hash32(value)); - hash = m.hash; - s_key_tracer.add(m.values.item_key, value); + KeyMaker key_maker(detector.key(), detail::hash32(value)); + hash = key_maker.hash; + s_key_tracer.add(key_maker.values.item_key, value); } /// Constructor from detector element and item sub-key @@ -233,16 +233,16 @@ ConditionKey::KeyMaker::KeyMaker(DetElement detector, Condition::itemkey_type it /// Constructor from string ConditionKey::KeyMaker::KeyMaker(Condition::detkey_type det_key, const string& value) { - KeyMaker m(det_key, detail::hash32(value)); - hash = m.hash; - s_key_tracer.add(m.values.item_key, value); + KeyMaker key_maker(det_key, detail::hash32(value)); + hash = key_maker.hash; + s_key_tracer.add(key_maker.values.item_key, value); } /// Constructor from string ConditionKey::ConditionKey(DetElement detector, const string& value) { - KeyMaker m(detector.key(), value); - hash = m.hash; - s_key_tracer.add(m.values.item_key, value); + KeyMaker key_maker(detector.key(), value); + hash = key_maker.hash; + s_key_tracer.add(key_maker.values.item_key, value); #ifdef DD4HEP_CONDITIONS_HAVE_NAME name = detector.path()+"#"+value; #endif @@ -250,9 +250,9 @@ ConditionKey::ConditionKey(DetElement detector, const string& value) { /// Constructor from detector element key and item sub-key ConditionKey::ConditionKey(Condition::detkey_type det_key, const string& value) { - KeyMaker m(det_key, value); - s_key_tracer.add(m.values.item_key, value); - hash = m.hash; + KeyMaker key_maker(det_key, value); + s_key_tracer.add(key_maker.values.item_key, value); + hash = key_maker.hash; #ifdef DD4HEP_CONDITIONS_HAVE_NAME char text[32]; ::snprintf(text,sizeof(text),"%08X#",det_key); @@ -272,16 +272,16 @@ ConditionKey::ConditionKey(DetElement detector, Condition::itemkey_type item_key /// Hash code generation from input string Condition::key_type ConditionKey::hashCode(DetElement detector, const char* value) { - KeyMaker m(detector.key(), value); - s_key_tracer.add(m.values.item_key, value); - return m.hash; + KeyMaker key_maker(detector.key(), value); + s_key_tracer.add(key_maker.values.item_key, value); + return key_maker.hash; } /// Hash code generation from input string Condition::key_type ConditionKey::hashCode(DetElement detector, const string& value) { - KeyMaker m(detector.key(), value); - s_key_tracer.add(m.values.item_key, value); - return m.hash; + KeyMaker key_maker(detector.key(), value); + s_key_tracer.add(key_maker.values.item_key, value); + return key_maker.hash; } /// 32 bit hashcode of the item diff --git a/DDG4/plugins/Geant4ScintillationPhysics.cpp b/DDG4/plugins/Geant4ScintillationPhysics.cpp index b6692f7ac..6f47be3ed 100644 --- a/DDG4/plugins/Geant4ScintillationPhysics.cpp +++ b/DDG4/plugins/Geant4ScintillationPhysics.cpp @@ -88,7 +88,7 @@ namespace dd4hep { declareProperty("WLS2TimeProfile", m_WLS2TimeProfile); declareProperty("CerenkovMaxPhotonsPerStep", m_CerenkovMaxPhotonsPerStep = -1); declareProperty("CerenkovMaxBetaChange", m_CerenkovMaxBetaChange = -1.0); - // declareProperty("ScintEnhancedTimeConstants", m_ScintEnhancedTimeConstants=false); + declareProperty("ScintEnhancedTimeConstants", m_ScintEnhancedTimeConstants=false); } /// Default destructor virtual ~Geant4ScintillationPhysics() = default; diff --git a/DDTest/src/test_Evaluator.cc b/DDTest/src/test_Evaluator.cc index aa60154e1..a780d37ff 100644 --- a/DDTest/src/test_Evaluator.cc +++ b/DDTest/src/test_Evaluator.cc @@ -146,8 +146,11 @@ int main(int /* argc */, char** /* argv */ ){ } ); - - std::thread t2([&countDownToStart, &success, &e_threads,&nameExtensions]() { +#if 0 + std::thread t2([&countDownToStart, &success, &e_threads,&nameExtensions]() +#endif + std::thread t2([&countDownToStart]() + { const std::string name("tb"); --countDownToStart; while(countDownToStart != 0); -- GitLab