From d9817519bb6effe0e047cf64dfad1b51c7d77387 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 24 Feb 2021 08:23:44 +0100 Subject: [PATCH] [sonar] Variable 'j' is not part of the loop control. --- src/smpi/mpi/smpi_group.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/smpi/mpi/smpi_group.cpp b/src/smpi/mpi/smpi_group.cpp index 0423a62041..a4e1738d1b 100644 --- a/src/smpi/mpi/smpi_group.cpp +++ b/src/smpi/mpi/smpi_group.cpp @@ -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); -- 2.20.1