diff --git a/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp b/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp
index 296d2eee1029943be53a24a50ab7f1ac5214087b..52151cc3ff2ba9d88ef97ae26c0f91b82a0ad947 100644
--- a/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp
+++ b/Framework/MDAlgorithms/src/SlicingAlgorithm.cpp
@@ -1076,7 +1076,7 @@ std::vector<size_t> SlicingAlgorithm::getIndicesWithProjection(
  */
 Mantid::Geometry::MDFrame_uptr
 SlicingAlgorithm::extractMDFrameForNonAxisAligned(
-    std::vector<size_t> indicesWithProjection, std::string units) const {
+    std::vector<size_t> indicesWithProjection, std::string) const {
   if (indicesWithProjection.empty()) {
     throw std::runtime_error("Slicing Algorithm: Chosen vector does not "
                              "project on any vector of the old basis.");