Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' into fix/execute_benched
[simgrid.git] / examples / msg / process-startkilltime / process-startkilltime.c
index 287fd11..cb11383 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2016. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2017. 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. */
@@ -8,7 +8,8 @@
 XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example");
 
 /* Executed on process termination*/
-static int my_onexit(void* ignored1, void *ignored2) {
+static int my_onexit(XBT_ATTRIB_UNUSED void* ignored1, XBT_ATTRIB_UNUSED void* ignored2)
+{
   XBT_INFO("Exiting now (done sleeping or got killed)."); /* - Just display an informative message (see tesh file) */
   return 0;
 }
@@ -26,8 +27,6 @@ static int sleeper(int argc, char *argv[])
 
 int main(int argc, char *argv[])
 {
-  msg_error_t res = MSG_OK;
-
   MSG_init(&argc, argv);
   xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
              "\tExample: %s msg_platform.xml msg_deployment.xml\n", argv[0], argv[0]);
@@ -36,7 +35,7 @@ int main(int argc, char *argv[])
   MSG_function_register("sleeper", sleeper);
   MSG_launch_application(argv[2]);   /* - Deploy the sleeper processes with explicit start/kill times */
 
-  res = MSG_main();                  /* - Run the simulation */
+  msg_error_t res = MSG_main(); /* - Run the simulation */
   XBT_INFO("Simulation time %g", MSG_get_clock());
   return res != MSG_OK;
 }