X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9598aaf7bc380fe9c5a374db28213d7580e8415b..e7cb73c92a8f68dc513934244646fa1a9d55f601:/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.cpp diff --git a/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.cpp b/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.cpp index 58413215da..54f8831d75 100644 --- a/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.cpp +++ b/teshsuite/msg/task_destroy_cancel/task_destroy_cancel.cpp @@ -1,15 +1,14 @@ -/* Copyright (c) 2010-2015. The SimGrid Team. - * All rights reserved. */ +/* Copyright (c) 2010-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 +#include "simgrid/Exception.hpp" #include "simgrid/msg.h" XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example"); -static int master(int argc, char *argv[]) +static int master(int /*argc*/, char* /*argv*/ []) { double task_comp_size = 5E7; double task_comm_size = 1E6; @@ -61,7 +60,7 @@ static int master(int argc, char *argv[]) return 0; } -static int worker_main(int argc, char *argv[]) +static int worker_main(int /*argc*/, char* /*argv*/ []) { msg_task_t task = (msg_task_t) MSG_process_get_data(MSG_process_self()); msg_error_t res; @@ -72,7 +71,7 @@ static int worker_main(int argc, char *argv[]) return 0; } -static int worker(int argc, char *argv[]) +static int worker(int /*argc*/, char* /*argv*/ []) { while (1) { msg_task_t task = NULL; @@ -80,13 +79,13 @@ static int worker(int argc, char *argv[]) xbt_assert(res == MSG_OK, "MSG_task_get failed"); XBT_INFO("Handling task \"%s\"", MSG_task_get_name(task)); - if (!strcmp(MSG_task_get_name(task), "finalize")) { + if (not strcmp(MSG_task_get_name(task), "finalize")) { XBT_INFO("Destroying task \"%s\"", task->name); MSG_task_destroy(task); break; } - if (!strcmp(MSG_task_get_name(task), "cancel")) { + if (not strcmp(MSG_task_get_name(task), "cancel")) { MSG_process_create("worker1", worker_main, task, MSG_host_self()); MSG_process_sleep(0.1); XBT_INFO("Canceling task \"%s\"", task->name);