From 4be81d7ad9c2675a5dda60ab3e485f7381e15924 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Sat, 6 Jul 2024 11:41:24 +0200 Subject: [PATCH 1/3] Add a missing header unistd.h; Clang 18 doesn't build without it --- DDG4/plugins/Geant4DetectorConstructionResources.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/DDG4/plugins/Geant4DetectorConstructionResources.cpp b/DDG4/plugins/Geant4DetectorConstructionResources.cpp index f07c283a5..f6aed44e5 100644 --- a/DDG4/plugins/Geant4DetectorConstructionResources.cpp +++ b/DDG4/plugins/Geant4DetectorConstructionResources.cpp @@ -14,6 +14,7 @@ // Framework include files #include +#include // C/C++ include files From f62ca75eafd1223582da64e84e727db229f14846 Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Sat, 6 Jul 2024 11:42:13 +0200 Subject: [PATCH 2/3] Fix a few warnings about unused variables or shadowing --- DDCond/src/ConditionsDependencyHandler.cpp | 2 -- DDG4/plugins/Geant4RegexSensitivesConstruction.cpp | 4 ++-- UtilityApps/src/next_event_dummy.cpp | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/DDCond/src/ConditionsDependencyHandler.cpp b/DDCond/src/ConditionsDependencyHandler.cpp index 97aee01fe..3088d1b58 100644 --- a/DDCond/src/ConditionsDependencyHandler.cpp +++ b/DDCond/src/ConditionsDependencyHandler.cpp @@ -108,7 +108,6 @@ void ConditionsDependencyHandler::compute() { /// 2nd pass: Handler callback for the second turn to resolve missing dependencies void ConditionsDependencyHandler::resolve() { PrintLevel prt_lvl = INFO; - size_t num_resolved = 0; std::vector tmp; std::map > work_pools; Work* w; @@ -120,7 +119,6 @@ void ConditionsDependencyHandler::resolve() { if ( w->state != RESOLVED ) { w->resolve(m_currentWork); } - ++num_resolved; // Fill an empty map of condition vectors for the block inserts auto ret = work_pools.emplace(w->iov->keyData,tmp); if ( ret.second ) { diff --git a/DDG4/plugins/Geant4RegexSensitivesConstruction.cpp b/DDG4/plugins/Geant4RegexSensitivesConstruction.cpp index cdd0e158a..6bb17fecb 100644 --- a/DDG4/plugins/Geant4RegexSensitivesConstruction.cpp +++ b/DDG4/plugins/Geant4RegexSensitivesConstruction.cpp @@ -102,9 +102,9 @@ Geant4RegexSensitivesConstruction::collect_volumes(std::set& volumes, // Try to minimize a bit the number of regex matches. if ( volumes.find(pv.volume()) == volumes.end() ) { if( !path.empty() ) { - for( const auto& m : matches ) { + for( const auto& match : matches ) { std::smatch sm; - bool stat = std::regex_match(path, sm, m); + bool stat = std::regex_match(path, sm, match); if( stat ) { volumes.insert(pv.volume()); ++count; diff --git a/UtilityApps/src/next_event_dummy.cpp b/UtilityApps/src/next_event_dummy.cpp index c5eb6da93..e2c81cd5a 100644 --- a/UtilityApps/src/next_event_dummy.cpp +++ b/UtilityApps/src/next_event_dummy.cpp @@ -18,7 +18,7 @@ TEveStraightLineSet* lineset(Int_t nlines = 40, Int_t nmarkers = 4) ; void next_event(){ - static int count = 1 ; + // static int count = 1 ; std::cout << " next_event called - nothing to do ... " << std::endl ; @@ -32,7 +32,7 @@ void next_event(){ gEve->Redraw3D(); - count += 3 ; + // count += 3 ; } From e3264a5dff3a5965c8465ba93714f6e4a3916a1d Mon Sep 17 00:00:00 2001 From: jmcarcell Date: Sat, 6 Jul 2024 11:42:32 +0200 Subject: [PATCH 3/3] Add .cache and compile_commands.json to .gitignore --- .gitignore | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitignore b/.gitignore index 791cadea1..ebfb33e73 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,9 @@ Version.h # XML files for DDUpgrade that are downloaded with cmake /examples/DDUpgrade/data + +# clangd files +.cache + +# CMake commands database +compile_commands.json