diff --git a/algo/detectors/rich/Unpack.cxx b/algo/detectors/rich/Unpack.cxx
index a66fb923c4fbbc9cbda0730e7e12848d2fdee5b5..c3b5d5a10d6640eea13a60290c8c873c1458c494 100644
--- a/algo/detectors/rich/Unpack.cxx
+++ b/algo/detectors/rich/Unpack.cxx
@@ -39,8 +39,8 @@ namespace cbm::algo::rich
       // -4*3 for 0xffffffff padding and 2 last words which contain microslice index
       if (reader.IsNextPadding() && reader.GetOffset() >= reader.GetSize() - 12) break;
     }
-    uint32_t msIndexWord1 = reader.NextWord();
-    uint32_t msIndexWord2 = reader.NextWord();
+    [[maybe_unused]] uint32_t msIndexWord1 = reader.NextWord();
+    [[maybe_unused]] uint32_t msIndexWord2 = reader.NextWord();
 
     return std::make_pair(std::move(ctx.digis), std::move(ctx.monitor));
   }
@@ -72,19 +72,20 @@ namespace cbm::algo::rich
       if (l > 1) ctx.prevLastCh0ReTime[l - 2] = fullTime;
     }
 
-    const uint32_t trbNum = reader.NextWord();  // TRB trigger number
+    [[maybe_unused]] const uint32_t trbNum = reader.NextWord();  // TRB trigger number
     //if (isLog()) L_(debug4) << getLogHeader(reader) << "TRB Num:" << reader.GetWordAsHexString(trbNum);
   }
 
 
   void Unpack::ProcessHubBlock(rich::MicrosliceReader& reader, MSContext& ctx) const
   {
-    uint32_t word          = reader.NextWord();
-    const uint32_t hubId   = word & 0xffff;          // 16 bits
-    const uint32_t hubSize = (word >> 16) & 0xffff;  // 16 bits
+    uint32_t word = reader.NextWord();
+
+    [[maybe_unused]] const uint32_t hubId = word & 0xffff;          // 16 bits
+    const uint32_t hubSize                = (word >> 16) & 0xffff;  // 16 bits
 
-    bool isLast         = false;  // if true then it is CTS sub-sub-event
-    size_t totalSize    = 0;
+    bool isLast            = false;  // if true then it is CTS sub-sub-event
+    size_t totalSize       = 0;
     ctx.currentSubSubEvent = 0;
 
     uint32_t subSubEventId, subSubEventSize;
@@ -125,16 +126,20 @@ namespace cbm::algo::rich
     }
   }
 
-  int Unpack::ProcessCtsHeader(rich::MicrosliceReader& reader, uint32_t subSubEventSize, uint32_t subSubEventId) const
+  int Unpack::ProcessCtsHeader(rich::MicrosliceReader& reader, uint32_t subSubEventSize,
+                               uint32_t /*subSubEventId*/) const
   {
-    const uint32_t word         = reader.NextWord();
-    const uint32_t ctsState     = word & 0xffff;                                                            // 16 bits
-    const uint32_t nofInputs    = (word >> 16) & 0xf;                                                       // 4 bits
-    const uint32_t nofTrigCh    = (word >> 20) & 0x1f;                                                      // 5 bits
-    const uint32_t inclLastIdle = (word >> 25) & 0x1;                                                       // 1 bit
-    const uint32_t inclTrigInfo = (word >> 26) & 0x1;                                                       // 1 bit
-    const uint32_t inclTime     = (word >> 27) & 0x1;                                                       // 1 bit
-    const uint32_t ETM          = (word >> 28) & 0x3;                                                       // 2 bits
+    const uint32_t word = reader.NextWord();
+
+    [[maybe_unused]] const uint32_t ctsState = word & 0xffff;  // 16 bits
+
+    const uint32_t nofInputs    = (word >> 16) & 0xf;   // 4 bits
+    const uint32_t nofTrigCh    = (word >> 20) & 0x1f;  // 5 bits
+    const uint32_t inclLastIdle = (word >> 25) & 0x1;   // 1 bit
+    const uint32_t inclTrigInfo = (word >> 26) & 0x1;   // 1 bit
+    const uint32_t inclTime     = (word >> 27) & 0x1;   // 1 bit
+    const uint32_t ETM          = (word >> 28) & 0x3;   // 2 bits
+
     uint32_t ctsInfoSize = 2 * nofInputs + 2 * nofTrigCh + 2 * inclLastIdle + 3 * inclTrigInfo + inclTime;  // in words
     switch (ETM) {
       case 0: break;
diff --git a/algo/detectors/tof/HitFinder.cxx b/algo/detectors/tof/HitFinder.cxx
index a784900be8e73dbfdbbe805e437c1fc0497c0ba7..caca727cca08c6261d36b22818edcb01435a0ac0 100644
--- a/algo/detectors/tof/HitFinder.cxx
+++ b/algo/detectors/tof/HitFinder.cxx
@@ -41,7 +41,7 @@ namespace cbm::algo::tof
     //reset counter
     numSameSide = 0;
 
-    for (int32_t chan = 0; chan < fParams.fChanPar.size(); chan++) {
+    for (int32_t chan = 0; chan < (int32_t) fParams.fChanPar.size(); chan++) {
 
       std::vector<CbmTofDigi*>& storDigiExp = digisExp[chan];
       std::vector<int32_t>& storDigiInd     = digisInd[chan];
diff --git a/algo/detectors/tof/ReadoutConfig.cxx b/algo/detectors/tof/ReadoutConfig.cxx
index d519b7d547ce1647a15921c3f461c3d343bffcae..012aadd6543d9fc59fa2acdc198e68fbf83d0fa2 100644
--- a/algo/detectors/tof/ReadoutConfig.cxx
+++ b/algo/detectors/tof/ReadoutConfig.cxx
@@ -412,6 +412,7 @@ namespace cbm::algo::tof
               }
             }
           }
+            [[fallthrough]];  // fall through is intended
           case 7: {
             // clang-format off
           const int32_t iChMap[160]={
diff --git a/algo/detectors/trd/Unpack.cxx b/algo/detectors/trd/Unpack.cxx
index 3e7667371e84b8c3082ede19d8c658cedc85101e..0d4bbf46a8b6437e44a7641a52da7f4aa5154e8a 100644
--- a/algo/detectors/trd/Unpack.cxx
+++ b/algo/detectors/trd/Unpack.cxx
@@ -226,7 +226,7 @@ namespace cbm::algo::trd
   {
     /// Save info message if needed.
     //if (fOptOutBVec) { fOptOutBVec->emplace_back(std::make_pair(ctx.fLastFulltime, frame)); }
-    Spadic::MsInfoType infotype = getInfoType(frame);
+    [[maybe_unused]] Spadic::MsInfoType infotype = getInfoType(frame);
     // "Spadic_Info_Types";
   }
 
diff --git a/reco/tasks/CbmTaskTofHitFinder.cxx b/reco/tasks/CbmTaskTofHitFinder.cxx
index 722c88e67865eb066b4268349dd4ab38216febb1..5015088a310520c353ebdd0ecee072c960569f19 100644
--- a/reco/tasks/CbmTaskTofHitFinder.cxx
+++ b/reco/tasks/CbmTaskTofHitFinder.cxx
@@ -50,7 +50,7 @@ using cbm::algo::tof::Cluster;
 using cbm::algo::tof::HitFinderRpcPar;
 
 const int32_t numClWalkBinX = 20;
-const double TTotMean       = 2.E4;
+// const double TTotMean       = 2.E4;
 
 /************************************************************************************/
 CbmTaskTofHitFinder::CbmTaskTofHitFinder() : FairTask("CbmTaskTofHitFinder"), fGeoHandler(new CbmTofGeoHandler()) {}