Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Explicit cast when loosing precision (C examples).
[simgrid.git] / examples / c / app-bittorrent / bittorrent-peer.c
index 82698bf..408d3f1 100644 (file)
@@ -79,7 +79,7 @@ void peer(int argc, char* argv[])
   xbt_assert(argc == 3 || argc == 4, "Wrong number of arguments");
 
   // Build peer object
-  peer_t peer = peer_init(xbt_str_parse_int(argv[1], "Invalid ID: %s"), argc == 4 ? 1 : 0);
+  peer_t peer = peer_init((int)xbt_str_parse_int(argv[1], "Invalid ID: %s"), argc == 4 ? 1 : 0);
 
   // Retrieve deadline
   peer->deadline = xbt_str_parse_double(argv[2], "Invalid deadline: %s");