diff --git a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/HighLevelBTagAlg.cxx b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/HighLevelBTagAlg.cxx
index 9aca1b66364752a76f85e1df2ea52d4522a6d4c3..4d35c7fc711f13a15b8b6017243b2f00e10288e9 100644
--- a/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/HighLevelBTagAlg.cxx
+++ b/PhysicsAnalysis/JetTagging/JetTagAlgs/BTagging/src/HighLevelBTagAlg.cxx
@@ -62,7 +62,7 @@ namespace Analysis {
     CHECK( m_dec_track_mom.initialize() );
 
     // create and initialize write handles
-    for (const std::string key: m_jetDecorator->getDecoratorKeys()) {
+    for (const std::string& key: m_jetDecorator->getDecoratorKeys()) {
       std::string full_key = m_BTagCollectionName.key() + "." + key;
       ATH_MSG_DEBUG("Adding " << full_key);
       m_outputKeys.emplace_back(std::make_unique<SG::WriteDecorHandleKey<xAOD::BTaggingContainer>>(this, key, full_key, ""));
diff --git a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx
index 9026acf04f44bbec94c01895dcf26d7960ec0796..1f37ff54499e8ee2be09bc141b852981440e893a 100644
--- a/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx
+++ b/PhysicsAnalysis/TauID/TauAnalysisTools/Root/CommonSmearingTool.cxx
@@ -179,7 +179,10 @@ CP::CorrectionCode CommonSmearingTool::applyCorrection( xAOD::TauJet& xTau )
   if (m_bApplyMVATES)
   {    
     // veto MVA TES for unreasonably low resolution values
-    bool bVeto = dynamic_cast<CombinedP4FromRecoTaus*>(m_tCombinedP4FromRecoTaus.get())->getUseCaloPtFlag(xTau);
+    bool bVeto = false;
+    if (auto combp4 = dynamic_cast<CombinedP4FromRecoTaus*>(m_tCombinedP4FromRecoTaus.get())) {
+      bVeto = combp4->getUseCaloPtFlag(xTau);
+    }
 
     if (xTau.nTracks() > 0 and xTau.nTracks() < 6)
     {
diff --git a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanFitter.cxx b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanFitter.cxx
index 90c908422b12e30964cc4f3eb1bae98e6c30ddd1..c1293717fd595848baf7787242576c98530c5c1c 100755
--- a/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanFitter.cxx
+++ b/Tracking/TrkFitter/TrkKalmanFitter/src/KalmanFitter.cxx
@@ -429,12 +429,13 @@ Trk::KalmanFitter::fit(const EventContext& ctx,
     ATH_MSG_VERBOSE( "list of parameters as they are on the input track:");
     DataVector<const TrackParameters>::const_iterator it
       = inputTrack.trackParameters()->begin();
-    for(int i=0 ; it!=inputTrack.trackParameters()->end(); ++it, ++i)
+    for(int i=0 ; it!=inputTrack.trackParameters()->end(); ++it, ++i) {
       ATH_MSG_VERBOSE( "TrackPar" << (i<10 ? "  " : " ") << i 
             << " position mag : " << (*it)->position().mag()
             << ", to ref is " << ((*it)->position()-m_sortingRefPoint).mag());
-      ATH_MSG_VERBOSE( "Now getting track parameters near origin " 
-                              << (m_option_enforceSorting? "via STL sort" : "as first TP (convention)"));
+    }
+    ATH_MSG_VERBOSE( "Now getting track parameters near origin " 
+                     << (m_option_enforceSorting? "via STL sort" : "as first TP (convention)"));
   }
   // fill internal trajectory through external preparator class
   const TrackParameters* minPar = nullptr;
@@ -1182,13 +1183,13 @@ bool Trk::KalmanFitter::invokeAnnealingFilter(const Trk::TrackParameters*&  star
           dafStatus = m_smoother->fitWithReference(m_trajectory, newFitQuality, kalMec);
         else
           dafStatus = m_smoother->fit(m_trajectory, newFitQuality, kalMec);
-          ATH_MSG_INFO( "Internal DAF returned with chi2 chain:");
-          for (Trk::Trajectory::const_iterator it=m_trajectory.begin();it!=m_trajectory.end(); it++) {
-            if (!it->isOutlier()) {
-              if (it->fitQuality()) ATH_MSG_INFO( it->fitQuality()->chiSquared() << " % ");
-              else                  ATH_MSG_INFO( "Problem - no FitQ % ");
-            }
+        ATH_MSG_INFO( "Internal DAF returned with chi2 chain:");
+        for (Trk::Trajectory::const_iterator it=m_trajectory.begin();it!=m_trajectory.end(); it++) {
+          if (!it->isOutlier()) {
+            if (it->fitQuality()) ATH_MSG_INFO( it->fitQuality()->chiSquared() << " % ");
+            else                  ATH_MSG_INFO( "Problem - no FitQ % ");
           }
+        }
       } 
           
       bool successfulRecovery  = newFitQuality!= nullptr