diff --git a/src/steering-method/cross-state-optimization.cc b/src/steering-method/cross-state-optimization.cc
index bb4056d64e18c6390f6c89efff6f779bc31efcae..8e2ebf2bdf225169776b1781927f9b1b1e564458 100644
--- a/src/steering-method/cross-state-optimization.cc
+++ b/src/steering-method/cross-state-optimization.cc
@@ -526,7 +526,7 @@ namespace hpp {
 
         std::string s = oss.str ();
         std::string s2 = "";
-        for (int i=0; i < s.size(); i++) {
+        for (size_type i=0; i < s.size(); i++) {
           if (s[i] == '_') s2 += "\\_";
           else s2.push_back(s[i]);
         }
@@ -748,7 +748,7 @@ namespace hpp {
 
         d.maxDepth = problem_->getParameter
 	        ("CrossStateOptimization/maxDepth").intValue();
-        int cnt = 0;
+        size_type cnt = 0;
         std::size_t nTriesForEachPath = problem_->getParameter
 	        ("CrossStateOptimization/nTriesForEachPath").intValue();