diff --git a/src/main.cpp b/src/main.cpp
index 5c78f4ae6f91a507ad81a44f789b568644997576..cf56b5daab85a9b359ba0de47addde96b053f327 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -173,7 +173,7 @@ int main(int argc, char *argv[])
       const Kokkos::View<const Rd*> xj   = mesh_data.xj();
       const Kokkos::View<const double*> rhoj = unknowns.rhoj();
       std::ofstream fout("rho");
-      for (int j=0; j<mesh.numberOfCells(); ++j) {
+      for (size_t j=0; j<mesh.numberOfCells(); ++j) {
         fout << xj[j][0] << ' ' << rhoj[j] << '\n';
       }
     }
diff --git a/src/mesh/Connectivity1D.hpp b/src/mesh/Connectivity1D.hpp
index 01c9368b80697f46a3a137420d538a45a7b1f8de..fa8bd871551fe0e2c06c3e7e8537f433403e8895 100644
--- a/src/mesh/Connectivity1D.hpp
+++ b/src/mesh/Connectivity1D.hpp
@@ -157,7 +157,7 @@ public:
       });
     m_node_cells(m_number_of_nodes-1,0) = m_number_of_cells-1;
 
-    Kokkos::parallel_for(m_number_of_nodes, KOKKOS_LAMBDA(const int& r) {
+    Kokkos::parallel_for(m_number_of_nodes, KOKKOS_LAMBDA(const unsigned int& r) {
 	for (int J=0; J<m_node_nb_cells(r); ++J) {
 	  int j = m_node_cells(r,J);
 	  for (int R=0; R<2; ++R) {