Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Explicit cast when loosing precision (C examples).
[simgrid.git] / examples / c / cloud-capping / cloud-capping.c
index aafc0dc..bc3de02 100644 (file)
@@ -20,7 +20,7 @@ static void worker_main(int argc, char* argv[])
 {
   xbt_assert(argc == 4);
   double computation_amount = xbt_str_parse_double(argv[1], "Invalid computation amount: %s");
-  int use_bound             = xbt_str_parse_int(argv[2], "Second parameter (use_bound) should be 0 or 1 but is: %s");
+  int use_bound             = !!xbt_str_parse_int(argv[2], "Second parameter (use_bound) should be 0 or 1 but is: %s");
   double bound              = xbt_str_parse_double(argv[3], "Invalid bound: %s");
 
   double clock_sta = simgrid_get_clock();