X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/16e27d2a68b9d21536c50eddff53fb68caa30d91..60211815916d3fd883c13c8bee9cb6d3ce3d2974:/teshsuite/msg/cloud-capping/cloud-capping.c diff --git a/teshsuite/msg/cloud-capping/cloud-capping.c b/teshsuite/msg/cloud-capping/cloud-capping.c index 7910743e18..b364e4f4c0 100644 --- a/teshsuite/msg/cloud-capping/cloud-capping.c +++ b/teshsuite/msg/cloud-capping/cloud-capping.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2019. 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. */ @@ -15,6 +15,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(msg_test, "Messages specific for this msg example") static int worker_main(int argc, char* argv[]) { + xbt_assert(argc == 4); double computation_amount = xbt_str_parse_double(argv[1], "Invalid computation amount: %s"); int use_bound = xbt_str_parse_int(argv[2], "Second parameter (use_bound) should be 0 or 1 but is: %s"); double bound = xbt_str_parse_double(argv[3], "Invalid bound: %s"); @@ -51,7 +52,7 @@ static void launch_worker(msg_host_t host, const char* pr_name, double computati MSG_process_create_with_arguments(pr_name, worker_main, NULL, host, 4, argv); } -static int worker_busy_loop_main(int argc, char* argv[]) +static int worker_busy_loop_main(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[]) { msg_task_t* task = MSG_process_get_data(MSG_process_self()); MSG_task_execute(*task); @@ -60,10 +61,9 @@ static int worker_busy_loop_main(int argc, char* argv[]) return 0; } -#define DOUBLE_MAX 1e11 - static void test_dynamic_change(void) { + const double DOUBLE_MAX = 1e11; msg_host_t pm0 = MSG_host_by_name("Fafard"); msg_vm_t vm0 = MSG_vm_create_core(pm0, "VM0"); @@ -190,7 +190,7 @@ static void test_two_tasks(msg_host_t hostA, msg_host_t hostB) MSG_process_sleep(1000); } -static int master_main(int argc, char* argv[]) +static int master_main(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[]) { msg_host_t pm0 = MSG_host_by_name("Fafard"); msg_host_t pm1 = MSG_host_by_name("Fafard");