diff --git a/sdpm/src/sdpmBuilder.cpp b/sdpm/src/sdpmBuilder.cpp
index 709718fff7ca9016d72b93ea74a9e93f1c85c2eb..367ee52547ea25be3548c072cf6edde996910eef 100644
--- a/sdpm/src/sdpmBuilder.cpp
+++ b/sdpm/src/sdpmBuilder.cpp
@@ -55,7 +55,7 @@ sdpmMatrixXd Builder::gatherCoords(bool symy, Element const *ej)
 
     // Get coordinates
     Eigen::MatrixXd coords(3, nV);
-    for (int j = 0; j < nV; ++j)
+    for (size_t j = 0; j < nV; ++j)
         coords.col(j) = nods[nV - 1 - j]->getCoords();
     if (symy)
         coords.row(1) = -coords.row(1);
diff --git a/sdpm/src/sdpmGmshImport.cpp b/sdpm/src/sdpmGmshImport.cpp
index 7cfd10fc457b85ebdc6db96d11e6966c02b8209d..2b230ae5b98c22d18c4fb2da429a83360851ed11 100644
--- a/sdpm/src/sdpmGmshImport.cpp
+++ b/sdpm/src/sdpmGmshImport.cpp
@@ -90,7 +90,7 @@ void GmshImport::readPhysicalTags(FILE *file)
         {
             Tag *tag = new Tag(no, name, dim);
             _tagMap[no] = tag;
-            _msh.addTag(static_cast<std::string>(name), tag);
+            _msh.addTag(name, tag);
         }
     }
 }
@@ -150,7 +150,7 @@ void GmshImport::readElements(FILE *file)
         if (nbtags > 1)
         {
             size_t idx;
-            for (size_t itag = 1; itag < nbtags; ++itag)
+            for (int itag = 1; itag < nbtags; ++itag)
                 if (fscanf(file, "%zu", &idx) != 1)
                     throw std::runtime_error("GmshImport::readElements: error reading tags!\n");
         }
diff --git a/sdpm/src/sdpmMesh.h b/sdpm/src/sdpmMesh.h
index a85aa8a662d758b92e7e653a1533b23a36732484..f11aaeedf570fabc6782a3b1dbde82e8cc3539e4 100644
--- a/sdpm/src/sdpmMesh.h
+++ b/sdpm/src/sdpmMesh.h
@@ -50,10 +50,10 @@ public:
     std::map<std::string, Tag *> const &getTags() const { return _tags; }
 #ifndef SWIG
     // Setters
-    void setName(std::string &n) { _name = n; }
+    void setName(std::string const &n) { _name = n; }
     void addNode(Node *n) { _nodes.push_back(n); }
     void addElement(Element *e) { _elements.push_back(e); }
-    void addTag(std::string &n, Tag *t) { _tags[n] = t; }
+    void addTag(std::string const &n, Tag *t) { _tags[n] = t; }
     void reserveNodes(size_t n) { _nodes.reserve(n); }
     void reserveElements(size_t n) { _elements.reserve(n); }
 #endif