Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiling with Clang 18 and a few warnings #1290

Merged
merged 3 commits into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions DDCond/src/ConditionsDependencyHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Condition> tmp;
std::map<IOV::Key,std::vector<Condition> > work_pools;
Work* w;
Expand All @@ -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 ) {
Expand Down
1 change: 1 addition & 0 deletions DDG4/plugins/Geant4DetectorConstructionResources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

// Framework include files
#include <DDG4/Geant4DetectorConstruction.h>
#include <unistd.h>

// C/C++ include files

Expand Down
4 changes: 2 additions & 2 deletions DDG4/plugins/Geant4RegexSensitivesConstruction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ Geant4RegexSensitivesConstruction::collect_volumes(std::set<Volume>& 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;
Expand Down
4 changes: 2 additions & 2 deletions UtilityApps/src/next_event_dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ;

Expand All @@ -32,7 +32,7 @@ void next_event(){

gEve->Redraw3D();

count += 3 ;
// count += 3 ;
}


Expand Down
Loading