From e00fda5df723b84fcc28b5d9b03adc76b36c5bf4 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 19 Feb 2020 09:55:42 +0100 Subject: [PATCH] Fix attributes for variables. --- examples/c/actor-migrate/actor-migrate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.20.1