Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
public headers should include simgrid in a system-wide way, not a project-wide one
[simgrid.git] / examples / msg / network-ns3 / network-ns3.c
index c422f5c..f133b16 100644 (file)
@@ -1,17 +1,18 @@
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2018. 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. */
 
 #include "simgrid/msg.h"
 
+#include <stdio.h> /* snprintf */
+
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
 int timer_start; //set as 1 in the master process
 
 //keep a pointer to all surf running tasks.
 #define NTASKS 1500
-int bool_printed = 0;
 double start_time, end_time, elapsed_time;
 double gl_data_size[NTASKS];
 msg_task_t gl_task_array[NTASKS];
@@ -126,9 +127,6 @@ static int worker(int argc, char *argv[])
 
 int main(int argc, char *argv[])
 {
-  msg_error_t res = MSG_OK;
-  bool_printed = 0;
-
   MSG_init(&argc, argv);
   xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
              "\tExample: %s platform.xml deployment.xml\n", argv[0], argv[0]);
@@ -142,7 +140,7 @@ int main(int argc, char *argv[])
 
   MSG_launch_application(argv[2]);
 
-  res = MSG_main();
+  msg_error_t res = MSG_main();
 
   return res != MSG_OK;
 }