From f5e4d29b0bda505ee8aac7b10f2e9ea5d78dc01b Mon Sep 17 00:00:00 2001 From: sss Date: Thu, 8 May 2025 11:47:18 -0400 Subject: [PATCH] Fix clang warnings. Unused variables. --- src/geartgeo/MaterialMap.cc | 2 -- src/geartgeo/TGeoGearPointProperties.cc | 4 ---- src/test/testgear.cc | 2 +- src/test/testtpcproto.cc | 1 + 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/geartgeo/MaterialMap.cc b/src/geartgeo/MaterialMap.cc index 70755df..64196f9 100644 --- a/src/geartgeo/MaterialMap.cc +++ b/src/geartgeo/MaterialMap.cc @@ -194,7 +194,6 @@ namespace gear { if(_zmin<=pz[1] && pz[1]<=_zmax) zcount++; //calculate distances from x,y,z to each neighbour - int counter=0; double sumIntL=0,sumRadL=0,sumWeight=0; bool isOnGrid=false; for(int ix=0;ix gpos; calculateGridIndex(gpos,px[ix],py[iy],pz[iz]); std::pair vals=_myMap[gpos[0]][gpos[1]][gpos[2]]; - counter++; if(fabs(d)<1e-5)//point in querry is a grid point { sumRadL=vals.first; diff --git a/src/geartgeo/TGeoGearPointProperties.cc b/src/geartgeo/TGeoGearPointProperties.cc index 133ba11..d9b7cff 100644 --- a/src/geartgeo/TGeoGearPointProperties.cc +++ b/src/geartgeo/TGeoGearPointProperties.cc @@ -174,7 +174,6 @@ namespace gear { throw OutsideGeometryException("No geometry node found at given location. Either there is no node placed here or position is outside of top volume."); TGeoVolume *cvol=_tgeomanager->GetCurrentVolume(); - int count=0; while(cvol) { const char *name=cvol->GetName(); @@ -183,7 +182,6 @@ namespace gear { cvol=_tgeomanager->GetCurrentVolume(); if(name==_tgeomanager->GetTopVolume()->GetName()) break; - count++; } return names; } @@ -201,7 +199,6 @@ namespace gear { if(!node) throw OutsideGeometryException("No geometry node found at given location. Either there is no node placed here or position is outside of top volume."); - int count=0; while(node) { const char *name=node->GetName(); @@ -210,7 +207,6 @@ namespace gear { node=_tgeomanager->GetCurrentNode(); if(name==_tgeomanager->GetTopNode()->GetName()) break; - count++; } return names; } diff --git a/src/test/testgear.cc b/src/test/testgear.cc index a096bf8..296df26 100644 --- a/src/test/testgear.cc +++ b/src/test/testgear.cc @@ -1,4 +1,4 @@ - +#undef NDEBUG #include "gearimpl/FixedPadSizeDiskLayout.h" #include "gearimpl/Util.h" #include "gearxml/GearXML.h" diff --git a/src/test/testtpcproto.cc b/src/test/testtpcproto.cc index d5d1018..12ad21b 100644 --- a/src/test/testtpcproto.cc +++ b/src/test/testtpcproto.cc @@ -1,3 +1,4 @@ +#undef NDEBUG #include "gearimpl/RectangularPadRowLayout.h" #include "gearimpl/Util.h" #include "gearxml/GearXML.h"