Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines with new year.
[simgrid.git] / teshsuite / msg / io-file / io-file.c
index 2b44583..6444f5f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2008-2020. 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. */
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(io_file, "Messages specific for this io example");
 
-static int host(int argc, char* argv[])
+static int host(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
 {
   msg_file_t file = NULL;
   sg_size_t read;
   sg_size_t write;
-  msg_storage_t st;
   const char* st_name;
 
   switch (MSG_process_self_PID()) {
     case 1:
-      file    = MSG_file_open("c:\\Windows\\setupact.log", NULL);
+      file    = MSG_file_open("/tmp/include/surf/simgrid_dtd.h", NULL);
       st_name = "Disk2";
       break;
     case 2:
@@ -42,7 +41,7 @@ static int host(int argc, char* argv[])
 
   const char* filename = MSG_file_get_name(file);
   XBT_INFO("\tOpen file '%s'", filename);
-  st = MSG_storage_get_by_name(st_name);
+  const_sg_storage_t st = MSG_storage_get_by_name(st_name);
 
   XBT_INFO("\tCapacity of the storage element '%s' is stored on: %llu / %llu", filename, MSG_storage_get_used_size(st),
            MSG_storage_get_size(st));