diff --git a/geom/geom/src/TGeoShapeAssembly.cxx b/geom/geom/src/TGeoShapeAssembly.cxx
index c2eeb2b87b701a7304026aae79dcd949d4bb7443..d46be5226821189d1513c8871d105fda93a40977 100644
--- a/geom/geom/src/TGeoShapeAssembly.cxx
+++ b/geom/geom/src/TGeoShapeAssembly.cxx
@@ -241,6 +241,7 @@ Double_t TGeoShapeAssembly::DistFromOutside(const Double_t *point, const Double_
    indent++;
    TString sindent = "";
    for (Int_t k=0; k<indent; k++) sindent += "  ";
+   Int_t idebug = TGeoManager::GetVerboseLevel();
 #endif   
    if (!fBBoxOK) ((TGeoShapeAssembly*)this)->ComputeBBox();
    if (iact<3 && safe) {
@@ -255,7 +256,6 @@ Double_t TGeoShapeAssembly::DistFromOutside(const Double_t *point, const Double_
 #endif
    }
    // find distance to assembly
-   Int_t idebug = TGeoManager::GetVerboseLevel();
    Double_t snext = 0.0;
    Double_t dist;
    Double_t stepmax = step;
diff --git a/geom/geom/src/TGeoVolume.cxx b/geom/geom/src/TGeoVolume.cxx
index 45743cb6681b1793b5b3d923a49431d927618cba..e4526db4259ce578c4b7654cd181acdea0e0864e 100644
--- a/geom/geom/src/TGeoVolume.cxx
+++ b/geom/geom/src/TGeoVolume.cxx
@@ -1161,7 +1161,7 @@ Bool_t TGeoVolume::OptimizeVoxels()
 }
 
 //_____________________________________________________________________________
-void TGeoVolume::Print(Option_t *option) const
+void TGeoVolume::Print(Option_t *) const
 {
 // Print volume info
    printf("== Volume: %s type %s positioned %d times\n", GetName(), ClassName(), fRefCount);