diff --git a/Framework/Algorithms/src/DiffractionFocussing.cpp b/Framework/Algorithms/src/DiffractionFocussing.cpp
index 8716e88b605dc4212058eea7bc6438ffb3112ca8..354ba051a11408e58f45f100753e07d0e7455e94 100644
--- a/Framework/Algorithms/src/DiffractionFocussing.cpp
+++ b/Framework/Algorithms/src/DiffractionFocussing.cpp
@@ -83,7 +83,7 @@ void DiffractionFocussing::exec() {
   if (iprogress_step == 0)
     iprogress_step = 1;
   std::vector<int64_t> resultIndeces;
-  for (long groupNumber : groupNumbers) {
+  for (auto groupNumber : groupNumbers) {
     if (iprogress++ % iprogress_step == 0) {
       progress(0.68 + double(iprogress) / iprogress_count / 3);
     }
diff --git a/Framework/DataObjects/test/MDBoxFlatTreeTest.h b/Framework/DataObjects/test/MDBoxFlatTreeTest.h
index 8dbdd1fecb2149a88a32829a5e147a466451b2b8..3fcd866ec461a6c02cc4ca9d300e3393dc031ec2 100644
--- a/Framework/DataObjects/test/MDBoxFlatTreeTest.h
+++ b/Framework/DataObjects/test/MDBoxFlatTreeTest.h
@@ -93,8 +93,8 @@ public:
       if (!Boxes[i]->isBox())
         gridIndices.push_back(i);
     }
-    for (unsigned long gridIndice : gridIndices) {
-      delete Boxes[gridIndice];
+    for (auto gridIndex : gridIndices) {
+      delete Boxes[gridIndex];
     }
 
     // Clean up file
diff --git a/Framework/DataObjects/test/MDGridBoxTest.h b/Framework/DataObjects/test/MDGridBoxTest.h
index efa720f40f93c5968fb22a29123af6d211f14048..ff4538f21b275b5f5805b9c7acefc8616a46855a 100644
--- a/Framework/DataObjects/test/MDGridBoxTest.h
+++ b/Framework/DataObjects/test/MDGridBoxTest.h
@@ -295,11 +295,10 @@ public:
       TS_ASSERT_EQUALS(g->getChild(i - 2)->getParent(), g);
     }
     // MDGridBox will delete the children that it pulled in but the rest need to
-    // be
-    // taken care of manually
+    // be taken care of manually
     size_t indices[5] = {0, 1, 12, 13, 14};
-    for (unsigned long indice : indices)
-      delete boxes[indice];
+    for (auto index : indices)
+      delete boxes[index];
     delete g;
     delete bcc;
   }
diff --git a/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp b/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp
index f19bdbe5279cc847b036f58f84edb397b19a2ec6..7987881b15b54e526ba5644ac0d220475da0777e 100644
--- a/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp
+++ b/Framework/PythonInterface/mantid/dataobjects/src/Exports/Workspace2D.cpp
@@ -133,7 +133,7 @@ public:
       ws.setBinEdges(i, std::move(binEdgeData));
 
       SpectrumDefinition specDef;
-      for (unsigned long detectorIndex : detectorIndices) {
+      for (auto detectorIndex : detectorIndices) {
         specDef.add(detectorIndex);
       }
       spectrumDefinitions.emplace_back(std::move(specDef));