From: darndt Date: Tue, 5 Dec 2017 16:55:27 +0000 (+0100) Subject: Fix more warning regarding signed/unsigned comparison X-Git-Tag: v9.0.0-rc1~688^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5588%2Fhead;p=dealii.git Fix more warning regarding signed/unsigned comparison --- diff --git a/source/base/process_grid.cc b/source/base/process_grid.cc index 4727265fd0..4f05f91c11 100644 --- a/source/base/process_grid.cc +++ b/source/base/process_grid.cc @@ -143,12 +143,14 @@ namespace Utilities // Create an auxiliary communicator which has root and all inactive cores. // Assume that inactive cores start with id=n_process_rows*n_process_columns - Assert (mpi_process_is_active || this_mpi_process >= n_process_rows*n_process_columns, + const unsigned int n_active_mpi_processes = n_process_rows*n_process_columns; + Assert (mpi_process_is_active || + this_mpi_process >= n_active_mpi_processes, ExcInternalError()); std::vector inactive_with_root_ranks; inactive_with_root_ranks.push_back(0); - for (int i = n_process_rows*n_process_columns; i < n_mpi_processes; ++i) + for (unsigned int i = n_active_mpi_processes; i < n_mpi_processes; ++i) inactive_with_root_ranks.push_back(i); // Get the group of processes in mpi_communicator