From 96b18db23bd354b32e24b7b9343031c9c64647ab Mon Sep 17 00:00:00 2001
From: "se.gorbunov" <se.gorbunov@gsi.de>
Date: Mon, 23 Oct 2023 21:09:09 +0000
Subject: [PATCH] compiler warning fixes in tracking interfaces

---
 algo/evbuild/EventbuildChain.h               | 2 +-
 core/base/utils/CbmGeometryUtils.cxx         | 4 +---
 core/detectors/mvd/CbmMvdTrackingInterface.h | 6 ++++--
 core/detectors/sts/CbmStsTrackingInterface.h | 6 ++++--
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/algo/evbuild/EventbuildChain.h b/algo/evbuild/EventbuildChain.h
index 05ada402d4..4c50976cbf 100644
--- a/algo/evbuild/EventbuildChain.h
+++ b/algo/evbuild/EventbuildChain.h
@@ -18,7 +18,7 @@
 
 namespace cbm::algo
 {
-  class DigiData;
+  struct DigiData;
 }
 
 namespace cbm::algo::evbuild
diff --git a/core/base/utils/CbmGeometryUtils.cxx b/core/base/utils/CbmGeometryUtils.cxx
index f1af3ad542..a59ec417c6 100644
--- a/core/base/utils/CbmGeometryUtils.cxx
+++ b/core/base/utils/CbmGeometryUtils.cxx
@@ -85,9 +85,8 @@ namespace Cbm
         mat = med->GetMaterial();
 
         Int_t UniqueID = 0;  // INT_MAX 2147483647 overflow to negative ID not so undesireable.
-        Int_t i        = 0;
 
-        while (i <= strlen(mat->GetName())) {
+        for (size_t i = 0; i < strlen(mat->GetName()); ++i) {
           if (mat->GetName()[i] >= 'A' && mat->GetName()[i] <= 'Z') {
             UniqueID +=
               ((Int_t) pow((double) base, (double) i) % INT_MAX) * ((Int_t) mat->GetName()[i] - 'B');  // So A=1
@@ -100,7 +99,6 @@ namespace Cbm
             UniqueID +=
               ((Int_t) pow((double) base, (double) i + 1) % INT_MAX) * ((Int_t) mat->GetName()[i]);  // i+1 equiv +base
           };
-          i++;
         }
 
         med->SetId((UniqueID > 0) ? UniqueID : -1 * UniqueID);
diff --git a/core/detectors/mvd/CbmMvdTrackingInterface.h b/core/detectors/mvd/CbmMvdTrackingInterface.h
index f3dd228342..89e0f4a800 100644
--- a/core/detectors/mvd/CbmMvdTrackingInterface.h
+++ b/core/detectors/mvd/CbmMvdTrackingInterface.h
@@ -64,7 +64,8 @@ public:
   /// --- to be removed --- Gets the tracking station radiation length
   /// @param  stationId  Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1])
   /// @return Radiation length [cm]
-  [[deprecated]] double GetRadLength(int stationId) const
+  // TODO: remove this method
+  double GetRadLength(int stationId) const
   {
     return fMvdStationPar->GetZThickness(stationId) / (10. * fMvdStationPar->GetZRadThickness(stationId));
   }
@@ -78,7 +79,8 @@ public:
   /// --- to be removed --- Gets the tracking station thickness along the Z-axis
   /// @param  stationId  Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1])
   /// @return Station thickness [cm]
-  [[deprecated]] double GetSensorThickness(int stationId) const { return fMvdStationPar->GetZThickness(stationId); }
+  // TODO: remove this method
+  double GetSensorThickness(int stationId) const { return fMvdStationPar->GetZThickness(stationId); }
 
   /// @brief  Gets a tracking station of a CbmHit
   /// @param  hit  A pointer to CbmHit
diff --git a/core/detectors/sts/CbmStsTrackingInterface.h b/core/detectors/sts/CbmStsTrackingInterface.h
index 6853da15d9..4ee55056e6 100644
--- a/core/detectors/sts/CbmStsTrackingInterface.h
+++ b/core/detectors/sts/CbmStsTrackingInterface.h
@@ -136,12 +136,14 @@ public:
   /// -- to be removed -- Gets station radiation length
   /// \param  stationId  Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1])
   /// \return Radiation length [cm]
-  [[deprecated]] double GetRadLength(int stationId) const { return GetStsStation(stationId)->GetRadLength(); }
+  // TODO: remove this method
+  double GetRadLength(int stationId) const { return GetStsStation(stationId)->GetRadLength(); }
 
   /// -- to be removed -- Gets station thickness along the Z-axis
   /// \param  stationId  Tracking station ID in the setup (NOTE: must be in range [0..GetNstations()-1])
   /// \return Station thickness [cm]
-  [[deprecated]] double GetSensorThickness(int stationId) const { return GetStsStation(stationId)->GetSensorD(); }
+  // TODO: remove this method
+  double GetSensorThickness(int stationId) const { return GetStsStation(stationId)->GetSensorD(); }
 
   /// @brief FairTask: sets parameter containers up
   void SetParContainers();
-- 
GitLab