diff --git a/Mesh/meshGFaceBDS.cpp b/Mesh/meshGFaceBDS.cpp
index 66f0079f3a51bd12a60fca141ae9d2bcf2a5493a..aae39273833383baad3b4a5fb18bb33cf89eca3a 100644
--- a/Mesh/meshGFaceBDS.cpp
+++ b/Mesh/meshGFaceBDS.cpp
@@ -102,33 +102,6 @@ inline double computeEdgeLinearLength_new(BDS_Point *p1, BDS_Point *p2,  GFace *
   return l;
 }
 
-inline double computeEdgeMiddleCoord_new(BDS_Point *p1, BDS_Point *p2, GFace *f,
-                                         double SCALINGU, double SCALINGV)
-{
-  const int nbSb = 3;
-  double L = computeEdgeLinearLength(p1,p2);
-  GPoint GP[nbSb];
-  for (int i = 1; i < nbSb; i++){
-    double xi = (double)i / nbSb;
-    GP[i-1] = f->point(SPoint2(((1-xi) * p1->u + xi * p2->u) * SCALINGU,
-                               ((1-xi) * p1->v + xi * p2->v) * SCALINGV));
-    if (!GP[i-1].succeeded())
-      return 0.5;
-    const double dx1 = p1->X - GP[i-1].x();
-    const double dy1 = p1->Y - GP[i-1].y();
-    const double dz1 = p1->Z - GP[i-1].z();
-    double LPLUS = sqrt(dx1 * dx1 + dy1 * dy1 + dz1 * dz1);
-    if (LPLUS > L*.5){
-      double XIMINUS, LPLUS, LMINUS;
-      if (i==1){
-        XIMINUS=0;
-      }
-      return  XIMINUS +  (LPLUS - L*.5)/(LPLUS-LMINUS)/(nbSb-1);
-    }
-  }
-  return 0.5;
-}
-
 inline double computeEdgeMiddleCoord(BDS_Point *p1, BDS_Point *p2, GFace *f,
                                      double SCALINGU, double SCALINGV)
 {
diff --git a/Mesh/meshGFaceElliptic.cpp b/Mesh/meshGFaceElliptic.cpp
index 450bb2fe3e8e5fb8707008a6a2ed2fa923007d1b..9d98117f1353fe5aabda7a9a51cbfba0db23bd0b 100644
--- a/Mesh/meshGFaceElliptic.cpp
+++ b/Mesh/meshGFaceElliptic.cpp
@@ -635,7 +635,7 @@ bool createRegularTwoCircleGridPeriodic (Centerline *center, GFace *gf)
 
 #else
   return false;
-#endif;
+#endif
 
 }
 
@@ -739,7 +739,7 @@ bool createRegularTwoCircleGrid (Centerline *center, GFace *gf)
 
 #else
   return false;
-#endif;
+#endif
 
 }
 
diff --git a/Mesh/meshMetric.cpp b/Mesh/meshMetric.cpp
index d05d177a4f463069e9559b872387a5d003847345..5997b9e47a5c7ddcdc0ed52d0cc662735cfd3c72 100644
--- a/Mesh/meshMetric.cpp
+++ b/Mesh/meshMetric.cpp
@@ -166,8 +166,8 @@ void meshMetric::exportInfo(const char * fileendname)
       SVector3 gradudx = dgrads[0][ver];
       SVector3 gradudy = dgrads[1][ver];
       SVector3 gradudz = dgrads[2][ver];
-      out_hess << (gradudx(0)+gradudy(1)+gradudz(2));
-      if ((i==(e->getNumVertices()-1))){
+      out_hess << (gradudx(0) + gradudy(1) + gradudz(2));
+      if (i == (e->getNumVertices() - 1)){
 	out_ls << "};" << std::endl;
 	out_hess << "};" << std::endl;
       }
@@ -177,11 +177,11 @@ void meshMetric::exportInfo(const char * fileendname)
       }
       for (int k=0;k<3;k++){
         out_grad << grads[ver](k);
-        if ((k==2)&&(i==(e->getNumVertices()-1)))  out_grad << "};" << std::endl;
+        if ((k == 2) && (i == (e->getNumVertices() - 1))) out_grad << "};" << std::endl;
         else out_grad << ",";
         for (int l=0;l<3;l++){
           out_metric << _nodalMetrics[ver](k,l);
-          if ((k==2)&&(l==2)&&(i==(e->getNumVertices()-1))) out_metric << "};" << std::endl;
+          if ((k == 2) && (l == 2) && (i == (e->getNumVertices() - 1))) out_metric << "};" << std::endl;
           else out_metric << ",";
         }
       }
diff --git a/Mesh/multiscalePartition.h b/Mesh/multiscalePartition.h
index 74425f157e2bd66276634896f0c5dd180ab7050f..791c477fb4860113871122162800fee9044c542b 100644
--- a/Mesh/multiscalePartition.h
+++ b/Mesh/multiscalePartition.h
@@ -16,7 +16,7 @@
 #include "meshPartition.h"
 
 class MElement;
-struct meshPartitionOptions;
+class meshPartitionOptions;
 
 struct partitionLevel {
   int recur;
diff --git a/Solver/functionSpace.h b/Solver/functionSpace.h
index cbb0f9340835eb0f9ba37e5e2a0d5dca5887731f..48344e5e6e5b9476e89633e54c9a42c278483bc0 100644
--- a/Solver/functionSpace.h
+++ b/Solver/functionSpace.h
@@ -741,8 +741,6 @@ template <class T, class F> void FilteredFunctionSpace<T, F>::getKeys(MElement *
   std::vector<Dof> bufk;
   bufk.reserve(normalk);
   _spacebase->getKeys(elep, bufk);
-  int normaldofs = bufk.size();
-  int nbdofs = 0;
 
   for (int i = 0; i < bufk.size(); i++){
     if ((*_filter)(bufk[i]))