X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6f5a3a45f1fc86d0ca10bc6c31e22e5686071f45..0f8a9bd2229ff3319def2e72ffe058b3739c4a05:/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.c diff --git a/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.c b/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.c index b2fbc2148d..c4b081edd2 100644 --- a/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.c +++ b/teshsuite/smpi/pt2pt-dsend/pt2pt-dsend.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2019. The SimGrid Team. +/* Copyright (c) 2011-2021. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -11,23 +11,21 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(dsend,"the dsend test"); -static void test_opts(int* argc, char **argv[]){ - int found = 0, ret; +static void test_opts(int argc, char* const argv[]) +{ + int found = 0; int option_index = 0; static struct option long_options[] = { - {"long", no_argument, 0, 0 }, + {(char*)"long", no_argument, 0, 0 }, {0, 0, 0, 0 } }; while (1) { - ret = getopt_long(*argc, *argv, "s", - long_options, &option_index); + int ret = getopt_long(argc, argv, "s", long_options, &option_index); if(ret==-1) break; switch (ret) { case 0: - found++; - break; case 's': found ++; break; @@ -49,7 +47,7 @@ int main(int argc, char *argv[]) MPI_Init(NULL, NULL); /* test getopt_long function */ - test_opts(&argc, &argv); + test_opts(argc, argv); MPI_Comm_rank(MPI_COMM_WORLD, &rank); MPI_Request r; @@ -77,5 +75,5 @@ int main(int argc, char *argv[]) XBT_INFO("rank %d: data exchanged", rank); MPI_Finalize(); - return 0; + exit(0); }