From: Arnaud Giersch Date: Wed, 19 Feb 2020 08:55:42 +0000 (+0100) Subject: Fix attributes for variables. X-Git-Tag: v3.26~944 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e00fda5df723b84fcc28b5d9b03adc76b36c5bf4?ds=sidebyside Fix attributes for variables. --- diff --git a/examples/c/actor-migrate/actor-migrate.c b/examples/c/actor-migrate/actor-migrate.c index db761bc7cf..0f28565bc2 100644 --- a/examples/c/actor-migrate/actor-migrate.c +++ b/examples/c/actor-migrate/actor-migrate.c @@ -13,10 +13,11 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(actor_migrate, "Messages specific for this example"); -static void worker(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[]) +static void worker(int argc, char* argv[]) { + xbt_assert(argc > 2); sg_host_t first = sg_host_by_name(argv[1]); - sg_host_t second = sg_host_by_name(argv[2]); + const_sg_host_t second = sg_host_by_name(argv[2]); double flopAmount = sg_host_speed(first) * 5 + sg_host_speed(second) * 5;