From: Wolfgang Bangerth Date: Fri, 25 Jun 2010 20:25:02 +0000 (+0000) Subject: Patch from Marc Secanell: Avoid warnings with certain compilers about unused variables. X-Git-Tag: v8.0.0~5908 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d60ca44a98f6cbc40a4b0b38293d1212a7e92786;p=dealii.git Patch from Marc Secanell: Avoid warnings with certain compilers about unused variables. git-svn-id: https://svn.dealii.org/trunk@21381 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/symmetric_tensor.h b/deal.II/base/include/base/symmetric_tensor.h index 7841c67b68..6d45f7f9d9 100644 --- a/deal.II/base/include/base/symmetric_tensor.h +++ b/deal.II/base/include/base/symmetric_tensor.h @@ -1524,9 +1524,8 @@ double SymmetricTensor<2,1>::operator () (const TableIndices<2> &indices) const { const unsigned int rank = 2; - const unsigned int dim = 1; for (unsigned int r=0; r::operator () (const TableIndices<2> &indices) { const unsigned int rank = 2; - const unsigned int dim = 2; for (unsigned int r=0; r::operator () (const TableIndices<2> &indices) const { const unsigned int rank = 2; - const unsigned int dim = 2; for (unsigned int r=0; r::operator () (const TableIndices<2> &indices) { const unsigned int rank = 2; - const unsigned int dim = 3; for (unsigned int r=0; r::operator () (const TableIndices<2> &indices) const { const unsigned int rank = 2; - const unsigned int dim = 3; for (unsigned int r=0; r::operator () (const TableIndices<4> &indices) { const unsigned int rank = 4; - const unsigned int dim = 1; for (unsigned int r=0; r::operator () (const TableIndices<4> &indices) const { const unsigned int rank = 4; - const unsigned int dim = 1; for (unsigned int r=0; r::operator () (const TableIndices<4> &indices) { const unsigned int rank = 4; - const unsigned int dim = 2; for (unsigned int r=0; r::operator () (const TableIndices<4> &indices) const { const unsigned int rank = 4; - const unsigned int dim = 2; for (unsigned int r=0; r::operator () (const TableIndices<4> &indices) { const unsigned int rank = 4; - const unsigned int dim = 3; for (unsigned int r=0; r::operator () (const TableIndices<4> &indices) const { const unsigned int rank = 4; - const unsigned int dim = 3; for (unsigned int r=0; r::component_to_unrolled_index (const TableIndices<2> &indices) { - const unsigned int dim = 1; - Assert (indices[0] < dim, ExcIndexRange(indices[0], 0, dim)); - Assert (indices[1] < dim, ExcIndexRange(indices[1], 0, dim)); + Assert (indices[0] < dimension, ExcIndexRange(indices[0], 0, dimension)); + Assert (indices[1] < dimension, ExcIndexRange(indices[1], 0, dimension)); return 0; } @@ -2053,12 +2041,11 @@ inline unsigned int SymmetricTensor<2,2>::component_to_unrolled_index (const TableIndices<2> &indices) { - const unsigned int dim = 2; - Assert (indices[0] < dim, ExcIndexRange(indices[0], 0, dim)); - Assert (indices[1] < dim, ExcIndexRange(indices[1], 0, dim)); + Assert (indices[0] < dimension, ExcIndexRange(indices[0], 0, dimension)); + Assert (indices[1] < dimension, ExcIndexRange(indices[1], 0, dimension)); - static const unsigned int table[dim][dim] = {{0, 2}, - {2, 1}}; + static const unsigned int table[dimension][dimension] = {{0, 2}, + {2, 1}}; return table[indices[0]][indices[1]]; }