From: Daniel Arndt Date: Sun, 3 Dec 2017 00:20:38 +0000 (+0100) Subject: Avoid warnings regarding comparisons between signed and unsigned variables X-Git-Tag: v9.0.0-rc1~696^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5568%2Fhead;p=dealii.git Avoid warnings regarding comparisons between signed and unsigned variables --- diff --git a/source/lac/scalapack.cc b/source/lac/scalapack.cc index 4c30617394..7308231001 100644 --- a/source/lac/scalapack.cc +++ b/source/lac/scalapack.cc @@ -144,7 +144,7 @@ template unsigned int ScaLAPACKMatrix::global_row(const unsigned int loc_row) const { - Assert (loc_row >= 0 && loc_row < n_local_rows, + Assert (n_local_rows >= 0 && loc_row < static_cast(n_local_rows), ExcIndexRange(loc_row,0,n_local_rows)); const int i = loc_row+1; return indxl2g_ (&i, &row_block_size, &(grid->this_process_row), &first_process_row, &(grid->n_process_rows)) - 1; @@ -156,7 +156,7 @@ template unsigned int ScaLAPACKMatrix::global_column(const unsigned int loc_column) const { - Assert (loc_column >= 0 && loc_column < n_local_columns, + Assert (n_local_columns >= 0 && loc_column < static_cast(n_local_columns), ExcIndexRange(loc_column,0,n_local_columns)); const int j = loc_column+1; return indxl2g_ (&j, &column_block_size, &(grid->this_process_column), &first_process_column, &(grid->n_process_columns)) - 1;