Salome HOME
Adapt for C++17
[tools/medcoupling.git] / src / ParaMEDMEMTest / test_MPI_Access_ISend_IRecv_Length_1.cxx
index c8587adb58a8ef95b270483fa048b8f8fe7bda1c..93a34cb51ad749292aec9b194f06e79dbb7ebaf3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -51,7 +51,7 @@ void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length_1() {
 
   if ( size < 2 ) {
     ostringstream strstream ;
-    strstream << "test_MPI_Access_ISend_IRecv_Length_1 must be runned with 2 procs" << endl ;
+    strstream << "test_MPI_Access_ISend_IRecv_Length_1 must be run with 2 procs" << endl ;
     cerr << strstream.str() << endl ;
     //CPPUNIT_FAIL( strstream.str() ) ;
     return;
@@ -94,9 +94,9 @@ void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length_1() {
     }
     int j ;
     for (j = 1 ; j <= i ; j++) {
-      int source ;
-      MPI_Datatype datatype ;
-      int outcount ;
+      int source = 0;
+      MPI_Datatype datatype = 0;
+      int outcount = 0;
       int flag ;
       if ( myrank == 0 ) {
         mpi_access.test( SendRequestId[j], flag ) ;
@@ -125,7 +125,7 @@ void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length_1() {
       }
       if ( flag ) {
         if ( myrank == 0 ) {
-          int target, tag, error, outcount ;
+          int tag, error ;
           mpi_access.status( SendRequestId[j], target, tag, error, outcount,
                              true ) ;
           debugStream << "test" << myrank << " Test(Send RequestId " << SendRequestId[j]
@@ -175,10 +175,8 @@ void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length_1() {
     debugStream << "test" << myrank << " TestAll SendRequest flag " << flag << endl ;
   }
   else {
-    int i ;
     int source ;
     int outcount ;
-    int flag ;
     if ( maxirecv != maxreq ) {
       ostringstream strstream ;
       strstream << "==========================================================="
@@ -213,8 +211,8 @@ void MPIAccessTest::test_MPI_Access_ISend_IRecv_Length_1() {
           mpi_access.status( RecvRequestId[i] , source , tag , error ,
                              outcount ) ;
           if ( i != 0 ) {
-            if ( outcount != 1000*i |
-                 (recvbuf[i][outcount-1] != (outcount-1)) ) {
+            if (( outcount != 1000*i ) ||
+                ((recvbuf[i][outcount-1] != (outcount-1)))) {
               ostringstream strstream ;
               strstream << "========================================================"
                         << endl << "test" << myrank << " outcount " << outcount