int i;
- _XBT_GNUC_UNUSED int res = sscanf(argv[1], "%d", &number_of_tasks);
+ XBT_ATTRIB_UNUSED int res = sscanf(argv[1], "%d", &number_of_tasks);
xbt_assert(res,"Invalid argument %s\n", argv[1]);
res = sscanf(argv[2], "%lg", &task_comp_size);
xbt_assert(res, "Invalid argument %s\n", argv[2]);
}
}
- { /* Process organisation */
+ { /* Process organization */
slaves_count = argc - 4;
slaves = xbt_new0(msg_host_t, slaves_count);
int slave(int argc, char *argv[])
{
msg_task_t task = NULL;
- _XBT_GNUC_UNUSED int res;
+ XBT_ATTRIB_UNUSED int res;
while (1) {
res = MSG_task_receive(&(task),MSG_host_get_name(MSG_host_self()));
xbt_assert(res == MSG_OK, "MSG_task_get failed");
int slaves_count;
msg_host_t *slaves;
- { /* Process organisation */
+ { /* Process organization */
slaves_count = argc - 1;
slaves = xbt_new0(msg_host_t, slaves_count);
msg_error_t res = MSG_OK;
MSG_init(&argc, argv);
- if (argc < 3) {
- printf("Usage: %s platform_file deployment_file\n", argv[0]);
- printf("example: %s msg_platform.xml msg_deployment.xml\n", argv[0]);
- exit(1);
- }
+ xbt_assert(argc > 2, "Usage: %s platform_file deployment_file\n"
+ "\tExample: %s msg_platform.xml msg_deployment.xml\n",
+ argv[0], argv[0]);
+
res = test_all(argv[1], argv[2]);
- if (res == MSG_OK)
- return 0;
- else
- return 1;
-} /* end_of_main */
+ return res != MSG_OK;
+}