Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Variable 'j' is not part of the loop control.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 24 Feb 2021 07:23:44 +0000 (08:23 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 24 Feb 2021 07:23:44 +0000 (08:23 +0100)
src/smpi/mpi/smpi_group.cpp

index 0423a62..a4e1738 100644 (file)
@@ -276,7 +276,8 @@ int Group::range_excl(int n, int ranges[][3], MPI_Group* newgroup)
   } else {
     *newgroup = new Group(newsize);
 
-    for (int j = 0, rank = 0; rank < size_; rank++) {
+    int j = 0;
+    for (int rank = 0; rank < size_; rank++) {
       if (not to_excl[rank]) {
         s4u::Actor* actor = this->actor(rank);
         (*newgroup)->set_mapping(actor, j);