From 9ebe4563a3ee1c8ae586f9f9e79ae20e9ca8fd5f Mon Sep 17 00:00:00 2001
From: Owen Arnold <owen.arnold@stfc.ac.uk>
Date: Mon, 30 Mar 2015 14:29:01 +0100
Subject: [PATCH] refs #11393. Fix warnings.

---
 Code/Mantid/Framework/MDAlgorithms/src/SmoothMD.cpp | 13 ++++++-------
 .../MDEvents/src/MDHistoWorkspaceIterator.cpp       |  4 ++--
 2 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/Code/Mantid/Framework/MDAlgorithms/src/SmoothMD.cpp b/Code/Mantid/Framework/MDAlgorithms/src/SmoothMD.cpp
index bc61cb6d568..3f7b1dd010a 100644
--- a/Code/Mantid/Framework/MDAlgorithms/src/SmoothMD.cpp
+++ b/Code/Mantid/Framework/MDAlgorithms/src/SmoothMD.cpp
@@ -78,7 +78,7 @@ SmoothMD::~SmoothMD() {}
 const std::string SmoothMD::name() const { return "SmoothMD"; }
 
 /// Algorithm's version for identification. @see Algorithm::version
-int SmoothMD::version() const { return 1; };
+int SmoothMD::version() const { return 1; }
 
 /// Algorithm's category for identification. @see Algorithm::category
 const std::string SmoothMD::category() const { return "MDAlgorithms"; }
@@ -86,7 +86,7 @@ const std::string SmoothMD::category() const { return "MDAlgorithms"; }
 /// Algorithm's summary for use in the GUI and help. @see Algorithm::summary
 const std::string SmoothMD::summary() const {
   return "Smooth an MDHistoWorkspace according to a weight function";
-};
+}
 
 /**
  * Hat function smoothing. All weights even. Hat function boundaries beyond
@@ -99,10 +99,10 @@ IMDHistoWorkspace_sptr SmoothMD::hatSmooth(IMDHistoWorkspace_const_sptr toSmooth
                                  const WidthVector &widthVector) {
 
   uint64_t nPoints = toSmooth->getNPoints();
-  Progress progress(this, 0, 1, size_t( nPoints * 1.1 ) );
+  Progress progress(this, 0, 1, size_t( double(nPoints) * 1.1 ) );
   // Create the output workspace.
   IMDHistoWorkspace_sptr outWS = toSmooth->clone();
-  progress.reportIncrement(size_t(nPoints * 0.1)); // Report ~10% progress
+  progress.reportIncrement(size_t(double(nPoints) * 0.1)); // Report ~10% progress
 
   const int nThreads = Mantid::API::FrameworkManager::Instance()
                            .getNumOMPThreads(); // NThreads to Request
@@ -116,7 +116,6 @@ IMDHistoWorkspace_sptr SmoothMD::hatSmooth(IMDHistoWorkspace_const_sptr toSmooth
     boost::scoped_ptr<MDHistoWorkspaceIterator> iterator(
         dynamic_cast<MDHistoWorkspaceIterator *>(iterators[it]));
 
-    size_t counter = 0;
     do {
       // Gets all vertex-touching neighbours
 
@@ -135,10 +134,10 @@ IMDHistoWorkspace_sptr SmoothMD::hatSmooth(IMDHistoWorkspace_const_sptr toSmooth
 
       // Calculate the mean
       outWS->setSignalAt(iterator->getLinearIndex(),
-                         sumSignal / (nNeighbours + 1));
+                         sumSignal / double(nNeighbours + 1));
       // Calculate the sample variance
       outWS->setErrorSquaredAt(iterator->getLinearIndex(),
-                               sumSqError / (nNeighbours + 1));
+                               sumSqError / double(nNeighbours + 1));
 
 
       progress.report();
diff --git a/Code/Mantid/Framework/MDEvents/src/MDHistoWorkspaceIterator.cpp b/Code/Mantid/Framework/MDEvents/src/MDHistoWorkspaceIterator.cpp
index df4bae6053a..7902abba202 100644
--- a/Code/Mantid/Framework/MDEvents/src/MDHistoWorkspaceIterator.cpp
+++ b/Code/Mantid/Framework/MDEvents/src/MDHistoWorkspaceIterator.cpp
@@ -485,8 +485,8 @@ MDHistoWorkspaceIterator::createPermutations(const int width) const {
           offset * static_cast<int64_t>(m_ws->getDimension(j - 1)->getNBins());
 
       size_t nEntries = permutationsVertexTouching.size();
-      for (size_t k = 1; k <= width / 2; ++k) {
-        for (size_t m = 0; m < nEntries; m++) {
+      for (int k = 1; k <= width / 2; ++k) {
+        for (int m = 0; m < nEntries; m++) {
           permutationsVertexTouching.push_back((offset * k) +
                                                permutationsVertexTouching[m]);
           permutationsVertexTouching.push_back((offset * k * (-1)) +
-- 
GitLab