Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add -Wextra to CFLAGS too.
[simgrid.git] / examples / c / io-disk-raw / io-disk-raw.c
index 4a09da3..d19b251 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2006-2022. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -30,7 +30,7 @@ static void host(int argc, char* argv[])
   sg_host_get_disks(sg_host_self(), &disk_count, &disk_list);
 
   for (unsigned int i = 0; i < disk_count; i++)
-    XBT_INFO("Disk name: %s (read: %.0f B/s -- write: %.0f B/s ", sg_disk_get_name(disk_list[i]),
+    XBT_INFO("Disk name: %s (read: %.0f B/s -- write: %.0f B/s", sg_disk_get_name(disk_list[i]),
              sg_disk_read_bandwidth(disk_list[i]), sg_disk_write_bandwidth(disk_list[i]));
 
   /* - Write 400,000 bytes on Disk1 */
@@ -66,7 +66,7 @@ int main(int argc, char* argv[])
   size_t host_count = sg_host_count();
   sg_host_t* hosts  = sg_host_list();
 
-  for (long i = 0; i < host_count; i++) {
+  for (size_t i = 0; i < host_count; i++) {
     XBT_INFO("*** %s properties ****", sg_host_get_name(hosts[i]));
     xbt_dict_t props         = sg_host_get_properties(hosts[i]);
     xbt_dict_cursor_t cursor = NULL;