Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Explicit cast when loosing precision (teshsuite/).
[simgrid.git] / teshsuite / xbt / parmap_bench / parmap_bench.cpp
index c57a9b1..789ee42 100644 (file)
@@ -128,7 +128,7 @@ int main(int argc, char* argv[])
   }
   timeout = atof(argv[2]);
   if (argc == 4)
-    modes = strtol(argv[2], NULL, 0);
+    modes = static_cast<unsigned>(strtoul(argv[2], NULL, 0));
 
   XBT_INFO("Parmap benchmark with %d workers (modes = %#x)...", nthreads, modes);
   XBT_INFO("%s", "");