X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b830103bb89748d30c84ff7a0e88ca821d2d78b7..9cfe6a57d7256613aa7b7be6335ef98fa49d4925:/teshsuite/smpi/privatization/privatization.c diff --git a/teshsuite/smpi/privatization/privatization.c b/teshsuite/smpi/privatization/privatization.c index 25668c8116..c4ddc7a21b 100644 --- a/teshsuite/smpi/privatization/privatization.c +++ b/teshsuite/smpi/privatization/privatization.c @@ -1,3 +1,7 @@ +/* Copyright (c) 2017-2023. 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. */ #include #include @@ -5,23 +9,20 @@ static int myvalue = 0; -static void test_opts(int* argc, char **argv[]){ +static void test_opts(int argc, char* const argv[]) +{ int found = 0; - int ret; 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_only(*argc, *argv, "s", - long_options, NULL); + int ret = getopt_long_only(argc, argv, "s", long_options, NULL); if(ret==-1) break; switch (ret) { case 0: - found++; - break; case 's': found ++; break; @@ -40,7 +41,7 @@ int main(int argc, char **argv) MPI_Init(&argc, &argv); /* test getopt_long function */ - test_opts(&argc, &argv); + test_opts(argc, argv); MPI_Comm_rank(MPI_COMM_WORLD, &me);