From: bangerth Date: Thu, 27 Feb 2014 21:12:22 +0000 (+0000) Subject: Avoid a few warnings produced by ICC. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbcff68f6d4772c46cb134b19743523d1c2a6779;p=dealii-svn.git Avoid a few warnings produced by ICC. git-svn-id: https://svn.dealii.org/trunk@32577 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/source/grid/grid_in.cc b/deal.II/source/grid/grid_in.cc index b4dcd39589..3bc720ce6e 100644 --- a/deal.II/source/grid/grid_in.cc +++ b/deal.II/source/grid/grid_in.cc @@ -127,7 +127,7 @@ void GridIn::read_vtk(std::istream &in) in >> keyword; - unsigned int total_cells, no_cells = 0, type, j = 0;// declaring counters, refer to the order of declaring variables for an idea of what is what! + unsigned int total_cells, no_cells = 0, type;// declaring counters, refer to the order of declaring variables for an idea of what is what! ///////////////////Processing the CELLS section that contains cells(cells) and bound_quads(subcelldata)/////////////////////// @@ -147,12 +147,12 @@ void GridIn::read_vtk(std::istream &in) cells.push_back(CellData()); - for (j = 0; j < type; j++) //loop to feed data + for (unsigned int j = 0; j < type; j++) //loop to feed data in >> cells.back().vertices[j]; cells.back().material_id = 0; - for (j = 0; j < type; j++) //loop to feed the data of the vertices to the cell + for (unsigned int j = 0; j < type; j++) //loop to feed the data of the vertices to the cell { cells.back().vertices[j] = vertex_indices[cells.back().vertices[j]]; } @@ -165,7 +165,7 @@ void GridIn::read_vtk(std::istream &in) subcelldata.boundary_quads.push_back(CellData<2>()); - for (j = 0; j < type; j++) //loop to feed the data to the boundary + for (unsigned int j = 0; j < type; j++) //loop to feed the data to the boundary { in >> subcelldata.boundary_quads.back().vertices[j]; } @@ -194,12 +194,12 @@ void GridIn::read_vtk(std::istream &in) { cells.push_back(CellData()); - for (j = 0; j < type; j++) //loop to feed data + for (unsigned int j = 0; j < type; j++) //loop to feed data in >> cells.back().vertices[j]; cells.back().material_id = 0; - for (j = 0; j < type; j++) //loop to feed the data of the vertices to the cell + for (unsigned int j = 0; j < type; j++) //loop to feed the data of the vertices to the cell { cells.back().vertices[j] = vertex_indices[cells.back().vertices[j]]; } @@ -213,7 +213,7 @@ void GridIn::read_vtk(std::istream &in) //and starts processing boundaries. subcelldata.boundary_lines.push_back(CellData<1>()); - for (j = 0; j < type; j++) //loop to feed the data to the boundary + for (unsigned int j = 0; j < type; j++) //loop to feed the data to the boundary { in >> subcelldata.boundary_lines.back().vertices[j]; } @@ -511,11 +511,11 @@ void GridIn::read_unv(std::istream &in) const unsigned int n_lines = (n_entities%2 == 0)?(n_entities/2):((n_entities+1)/2); - for (unsigned int no_line = 0; no_line < n_lines; no_line++) + for (unsigned int line = 0; line < n_lines; line++) { unsigned int n_fragments; - if (no_line == n_lines-1) + if (line == n_lines-1) n_fragments = (n_entities%2 == 0)?(2):(1); else n_fragments = 2;