From: David Wells Date: Sat, 4 Apr 2015 14:28:45 +0000 (-0400) Subject: Use the (void) trick to silence warnings. X-Git-Tag: v8.3.0-rc1~278^2~16 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3861e6088b302239fcec99c408f81c91325050b7;p=dealii.git Use the (void) trick to silence warnings. --- diff --git a/include/deal.II/base/symmetric_tensor.h b/include/deal.II/base/symmetric_tensor.h index cb6179434e..685de47e38 100644 --- a/include/deal.II/base/symmetric_tensor.h +++ b/include/deal.II/base/symmetric_tensor.h @@ -1937,6 +1937,7 @@ namespace internal component_to_unrolled_index (const TableIndices &indices) { + (void)indices; Assert (false, ExcNotImplemented()); return numbers::invalid_unsigned_int; } @@ -2031,6 +2032,7 @@ namespace internal (const unsigned int i, const int2type &) { + (void)i; Assert ((i < dealii::SymmetricTensor::n_independent_components), ExcIndexRange(i, 0, dealii::SymmetricTensor::n_independent_components)); Assert (false, ExcNotImplemented()); diff --git a/include/deal.II/base/vectorization.h b/include/deal.II/base/vectorization.h index ae337415bf..81563340e9 100644 --- a/include/deal.II/base/vectorization.h +++ b/include/deal.II/base/vectorization.h @@ -1351,6 +1351,7 @@ public: Number & operator [] (const unsigned int comp) { + (void)comp; AssertIndexRange (comp, 1); return data; } @@ -1361,6 +1362,7 @@ public: const Number & operator [] (const unsigned int comp) const { + (void)comp; AssertIndexRange (comp, 1); return data; } diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index 76f087f2e0..de1d8f4a4e 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -248,6 +248,7 @@ namespace internal const unsigned int local_index, dealii::internal::int2type<1>) { + (void)obj_level; // faces have no levels Assert (obj_level == 0, ExcInternalError()); return dof_handler.faces->lines. @@ -269,6 +270,7 @@ namespace internal dealii::internal::int2type<1>, const types::global_dof_index global_index) { + (void)obj_level; // faces have no levels Assert (obj_level == 0, ExcInternalError()); dof_handler.faces->lines. @@ -328,6 +330,7 @@ namespace internal const unsigned int local_index, dealii::internal::int2type<1>) { + (void)obj_level; // faces have no levels Assert (obj_level == 0, ExcInternalError()); return dof_handler.faces->lines. @@ -349,6 +352,7 @@ namespace internal dealii::internal::int2type<1>, const types::global_dof_index global_index) { + (void)obj_level; // faces have no levels Assert (obj_level == 0, ExcInternalError()); dof_handler.faces->lines. @@ -371,6 +375,7 @@ namespace internal const unsigned int local_index, dealii::internal::int2type<2>) { + (void)obj_level; // faces have no levels Assert (obj_level == 0, ExcInternalError()); return dof_handler.faces->quads. @@ -392,6 +397,7 @@ namespace internal dealii::internal::int2type<2>, const types::global_dof_index global_index) { + (void)obj_level; // faces have no levels Assert (obj_level == 0, ExcInternalError()); dof_handler.faces->quads. @@ -692,6 +698,9 @@ namespace internal const unsigned int obj_index, const dealii::internal::int2type &) { + (void)dof_handler; + (void)obj_level; + (void)obj_index; // check that the object we look // at is in fact active. the // problem is that we have @@ -740,6 +749,10 @@ namespace internal const unsigned int n, const dealii::internal::int2type &) { + (void)dof_handler; + (void)obj_level; + (void)obj_index; + (void)n; // check that the object we look // at is in fact active. the // problem is that we have @@ -817,6 +830,7 @@ namespace internal const unsigned int n, const dealii::internal::int2type<1> &) { + (void)n; Assert (n==0, ExcMessage("On cells, there can only be one active FE index")); return dof_handler.levels[obj_level]->active_fe_index (obj_index); } @@ -905,6 +919,7 @@ namespace internal const unsigned int n, const dealii::internal::int2type<2> &) { + (void)n; Assert (n==0, ExcMessage("On cells, there can only be one active FE index")); return dof_handler.levels[obj_level]->active_fe_index (obj_index); } @@ -1041,6 +1056,7 @@ namespace internal const unsigned int n, const dealii::internal::int2type<3> &) { + (void)n; Assert (n==0, ExcMessage("On cells, there can only be one active FE index")); return dof_handler.levels[obj_level]->active_fe_index (obj_index); } @@ -1059,6 +1075,7 @@ namespace internal const unsigned int local_index, const types::global_dof_index global_index) { + (void)fe_index; Assert ((fe_index == dealii::DoFHandler::default_fe_index), ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); Assert (dof_handler.selected_fe != 0, @@ -1147,6 +1164,7 @@ namespace internal const unsigned int fe_index, const unsigned int local_index) { + (void)fe_index; Assert ((fe_index == dealii::DoFHandler::default_fe_index), ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); Assert (dof_handler.selected_fe != 0, @@ -1548,6 +1566,7 @@ DoFAccessor::mg_vertex_dof_index (const int leve const unsigned int i, const unsigned int fe_index) const { + (void)fe_index; Assert (this->dof_handler != 0, ExcInvalidObject ()); Assert (vertex < GeometryInfo::vertices_per_cell, ExcIndexRange (vertex, 0, GeometryInfo::vertices_per_cell)); Assert (i < this->dof_handler->get_fe ()[fe_index].dofs_per_vertex, ExcIndexRange (i, 0, this->dof_handler->get_fe ()[fe_index].dofs_per_vertex)); @@ -1581,6 +1600,7 @@ DoFAccessor::set_mg_vertex_dof_index (const int const types::global_dof_index index, const unsigned int fe_index) const { + (void)fe_index; Assert (this->dof_handler != 0, ExcInvalidObject ()); Assert (vertex < GeometryInfo::vertices_per_cell, ExcIndexRange (vertex, 0, GeometryInfo::vertices_per_cell)); Assert (i < this->dof_handler->get_fe ()[fe_index].dofs_per_vertex, ExcIndexRange (i, 0, this->dof_handler->get_fe ()[fe_index].dofs_per_vertex)); @@ -2245,6 +2265,7 @@ vertex_dof_index (const unsigned int vertex, const unsigned int i, const unsigned int fe_index) const { + (void)vertex; Assert (vertex == 0, ExcIndexRange (vertex, 0, 1)); return dealii::internal::DoFAccessor::Implementation::get_vertex_dof_index ( *dof_handler, @@ -2564,6 +2585,7 @@ namespace internal const unsigned int dofs_per_vertex = accessor.get_fe().dofs_per_vertex, dofs_per_line = accessor.get_fe().dofs_per_line, dofs_per_cell = accessor.get_fe().dofs_per_cell; + (void)dofs_per_cell; Assert (local_dof_indices.size() == dofs_per_cell, ExcInternalError()); @@ -2597,6 +2619,7 @@ namespace internal dofs_per_line = accessor.get_fe().dofs_per_line, dofs_per_quad = accessor.get_fe().dofs_per_quad, dofs_per_cell = accessor.get_fe().dofs_per_cell; + (void)dofs_per_cell; Assert (local_dof_indices.size() == dofs_per_cell, ExcInternalError()); @@ -2634,6 +2657,7 @@ namespace internal dofs_per_quad = accessor.get_fe().dofs_per_quad, dofs_per_hex = accessor.get_fe().dofs_per_hex, dofs_per_cell = accessor.get_fe().dofs_per_cell; + (void)dofs_per_cell; Assert (local_dof_indices.size() == dofs_per_cell, ExcInternalError()); @@ -2746,6 +2770,7 @@ namespace internal set_active_fe_index (const DoFCellAccessor, level_dof_access> &, const unsigned int i) { + (void)i; // ::DoFHandler only supports a // single active fe with index // zero @@ -3291,6 +3316,7 @@ DoFCellAccessor::get_dof_values (const InputVector &values, ForwardIterator local_values_begin, ForwardIterator local_values_end) const { + (void)local_values_end; Assert (this->is_artificial() == false, ExcMessage ("Can't ask for DoF indices on artificial cells.")); Assert (!this->has_children(), diff --git a/include/deal.II/dofs/dof_objects.h b/include/deal.II/dofs/dof_objects.h index a7e7690c50..e64297f019 100644 --- a/include/deal.II/dofs/dof_objects.h +++ b/include/deal.II/dofs/dof_objects.h @@ -172,6 +172,7 @@ namespace internal const types::global_dof_index, const unsigned int fe_index) const { + (void)fe_index; Assert (fe_index == 0, ExcMessage ("Only zero fe_index values are allowed for " "non-hp DoFHandlers.")); @@ -190,6 +191,7 @@ namespace internal const unsigned int fe_index, const unsigned int local_index) const { + (void)fe_index; Assert ((fe_index == dealii::DoFHandler::default_fe_index), ExcMessage ("Only the default FE index is allowed for non-hp DoFHandler objects")); Assert (local_index(), diff --git a/include/deal.II/fe/fe.h b/include/deal.II/fe/fe.h index f9587adb31..1a10880f6e 100644 --- a/include/deal.II/fe/fe.h +++ b/include/deal.II/fe/fe.h @@ -2096,6 +2096,7 @@ inline const FiniteElement & FiniteElement::operator[] (const unsigned int fe_index) const { + (void)fe_index; Assert (fe_index == 0, ExcMessage ("A fe_index of zero is the only index allowed here")); return *this; diff --git a/include/deal.II/fe/fe_poly.templates.h b/include/deal.II/fe/fe_poly.templates.h index 2f0360c0f2..d5cf3bf864 100644 --- a/include/deal.II/fe/fe_poly.templates.h +++ b/include/deal.II/fe/fe_poly.templates.h @@ -62,6 +62,7 @@ FE_Poly::shape_value_component (const unsigned int i, const Point &p, const unsigned int component) const { + (void)component; Assert (idofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell)); Assert (component == 0, ExcIndexRange (component, 0, 1)); return poly_space.compute_value(i, p); @@ -86,6 +87,7 @@ FE_Poly::shape_grad_component (const unsigned int i, const Point &p, const unsigned int component) const { + (void)component; Assert (idofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell)); Assert (component == 0, ExcIndexRange (component, 0, 1)); return poly_space.compute_grad(i, p); @@ -110,6 +112,7 @@ FE_Poly::shape_grad_grad_component (const unsigned int i, const Point &p, const unsigned int component) const { + (void)component; Assert (idofs_per_cell, ExcIndexRange(i,0,this->dofs_per_cell)); Assert (component == 0, ExcIndexRange (component, 0, 1)); return poly_space.compute_grad_grad(i, p); diff --git a/include/deal.II/grid/tria_accessor.templates.h b/include/deal.II/grid/tria_accessor.templates.h index 1cba57bf1c..64ebe9f942 100644 --- a/include/deal.II/grid/tria_accessor.templates.h +++ b/include/deal.II/grid/tria_accessor.templates.h @@ -2139,6 +2139,8 @@ TriaAccessor (const Triangulation<1,spacedim> *tria, // of the iterator which calls the accessor with argument list (0,-2,-2,0), so // in this particular case accept this call and create an object that corresponds // to the default constructed (invalid) vertex accessor + (void)level; + (void)index; Assert ((level == -2) && (index == -2), ExcInternalError()); } diff --git a/include/deal.II/hp/dof_level.h b/include/deal.II/hp/dof_level.h index c4a138ec93..c7d6f2ffb1 100644 --- a/include/deal.II/hp/dof_level.h +++ b/include/deal.II/hp/dof_level.h @@ -292,6 +292,7 @@ namespace internal const unsigned int fe_index, const unsigned int local_index) const { + (void)fe_index; Assert (obj_index < dof_offsets.size(), ExcIndexRange (obj_index, 0, dof_offsets.size())); @@ -324,6 +325,7 @@ namespace internal const unsigned int local_index, const types::global_dof_index global_index) { + (void)fe_index; Assert (obj_index < dof_offsets.size(), ExcIndexRange (obj_index, 0, dof_offsets.size())); @@ -388,6 +390,7 @@ namespace internal DoFLevel::get_cell_cache_start (const unsigned int obj_index, const unsigned int dofs_per_cell) const { + (void)dofs_per_cell; Assert (obj_index < cell_cache_offsets.size(), ExcInternalError()); Assert (cell_cache_offsets[obj_index]+dofs_per_cell diff --git a/include/deal.II/lac/block_matrix_base.h b/include/deal.II/lac/block_matrix_base.h index 791c97ae2f..781a5e1e78 100644 --- a/include/deal.II/lac/block_matrix_base.h +++ b/include/deal.II/lac/block_matrix_base.h @@ -1075,6 +1075,7 @@ namespace BlockMatrixIterators matrix(matrix), base_iterator(matrix->block(0,0).begin()) { + (void)col; Assert(col==0, ExcNotImplemented()); // check if this is a regular row or @@ -1284,6 +1285,7 @@ namespace BlockMatrixIterators matrix(matrix), base_iterator(matrix->block(0,0).begin()) { + (void)col; Assert(col==0, ExcNotImplemented()); // check if this is a regular row or // the end of the matrix diff --git a/include/deal.II/lac/block_sparse_matrix_ez.templates.h b/include/deal.II/lac/block_sparse_matrix_ez.templates.h index 1a0982afe5..3abff0b4dd 100644 --- a/include/deal.II/lac/block_sparse_matrix_ez.templates.h +++ b/include/deal.II/lac/block_sparse_matrix_ez.templates.h @@ -76,6 +76,7 @@ template BlockSparseMatrixEZ & BlockSparseMatrixEZ::operator = (const double d) { + (void)d; Assert (d==0, ExcScalarAssignmentOnlyForZeroValue()); for (unsigned int r=0; r::BlockVector (const std::vector &n, // first set sizes of blocks, but // don't initialize them as we will // copy elements soon + (void)end; reinit (n, true); InputIterator start = first; for (size_type b=0; b ChunkSparseMatrix & ChunkSparseMatrix::operator = (const ChunkSparseMatrix &m) { + (void)m; Assert (m.cols==0, ExcInvalidConstructorCall()); Assert (m.val==0, ExcInvalidConstructorCall()); Assert (m.max_len==0, ExcInvalidConstructorCall()); @@ -340,6 +341,7 @@ ChunkSparseMatrix::ChunkSparseMatrix (const ChunkSparsityPattern &c, val(0), max_len(0) { + (void)id; Assert (c.n_rows() == id.m(), ExcDimensionMismatch (c.n_rows(), id.m())); Assert (c.n_cols() == id.n(), ExcDimensionMismatch (c.n_cols(), id.n())); @@ -381,6 +383,7 @@ template ChunkSparseMatrix & ChunkSparseMatrix::operator = (const double d) { + (void)d; Assert (d==0, ExcScalarAssignmentOnlyForZeroValue()); Assert (cols != 0, ExcNotInitialized()); @@ -418,6 +421,7 @@ template ChunkSparseMatrix & ChunkSparseMatrix::operator= (const IdentityMatrix &id) { + (void)id; Assert (cols->n_rows() == id.m(), ExcDimensionMismatch (cols->n_rows(), id.m())); Assert (cols->n_cols() == id.n(), @@ -601,6 +605,7 @@ ChunkSparseMatrix::extract_row_copy (const size_type row, size_type *column_indices, number *values) const { + (void)array_length; AssertIndexRange(cols->row_length(row), array_length+1); AssertIndexRange(row, m()); const unsigned int chunk_size = cols->get_chunk_size(); @@ -1238,6 +1243,8 @@ ChunkSparseMatrix::precondition_Jacobi (Vector &dst, const Vector &src, const number /*om*/) const { + (void)dst; + (void)src; Assert (cols != 0, ExcNotInitialized()); Assert (val != 0, ExcNotInitialized()); Assert (m() == n(), ExcMessage("This operation is only valid on square matrices.")); @@ -1259,6 +1266,8 @@ ChunkSparseMatrix::precondition_SSOR (Vector &dst, { // to understand how this function works you may want to take a look at the // CVS archives to see the original version which is much clearer... + (void)dst; + (void)src; Assert (cols != 0, ExcNotInitialized()); Assert (val != 0, ExcNotInitialized()); Assert (m() == n(), ExcMessage("This operation is only valid on square matrices.")); @@ -1310,6 +1319,7 @@ void ChunkSparseMatrix::SOR (Vector &dst, const number /*om*/) const { + (void)dst; Assert (cols != 0, ExcNotInitialized()); Assert (val != 0, ExcNotInitialized()); Assert (m() == n(), ExcMessage("This operation is only valid on square matrices.")); @@ -1325,6 +1335,7 @@ void ChunkSparseMatrix::TSOR (Vector &dst, const number /*om*/) const { + (void)dst; Assert (cols != 0, ExcNotInitialized()); Assert (val != 0, ExcNotInitialized()); Assert (m() == n(), ExcMessage("This operation is only valid on square matrices.")); @@ -1342,6 +1353,9 @@ ChunkSparseMatrix::PSOR (Vector &dst, const std::vector &inverse_permutation, const number /*om*/) const { + (void)dst; + (void)permutation; + (void)inverse_permutation; Assert (cols != 0, ExcNotInitialized()); Assert (val != 0, ExcNotInitialized()); Assert (m() == n(), ExcMessage("This operation is only valid on square matrices.")); @@ -1364,6 +1378,9 @@ ChunkSparseMatrix::TPSOR (Vector &dst, const std::vector &inverse_permutation, const number /*om*/) const { + (void)dst; + (void)permutation; + (void)inverse_permutation; Assert (cols != 0, ExcNotInitialized()); Assert (val != 0, ExcNotInitialized()); Assert (m() == n(), ExcMessage("This operation is only valid on square matrices.")); @@ -1386,6 +1403,8 @@ ChunkSparseMatrix::SOR_step (Vector &v, const Vector &b, const number /*om*/) const { + (void)v; + (void)b; Assert (cols != 0, ExcNotInitialized()); Assert (val != 0, ExcNotInitialized()); Assert (m() == n(), ExcMessage("This operation is only valid on square matrices.")); @@ -1405,6 +1424,8 @@ ChunkSparseMatrix::TSOR_step (Vector &v, const Vector &b, const number /*om*/) const { + (void)v; + (void)b; Assert (cols != 0, ExcNotInitialized()); Assert (val != 0, ExcNotInitialized()); Assert (m() == n(), ExcMessage("This operation is only valid on square matrices.")); @@ -1436,6 +1457,7 @@ void ChunkSparseMatrix::SSOR (Vector &dst, const number /*om*/) const { + (void)dst; Assert (cols != 0, ExcNotInitialized()); Assert (val != 0, ExcNotInitialized()); Assert (m() == n(), ExcMessage("This operation is only valid on square matrices.")); diff --git a/include/deal.II/lac/constraint_matrix.templates.h b/include/deal.II/lac/constraint_matrix.templates.h index b139753e0a..2fe7edc31b 100644 --- a/include/deal.II/lac/constraint_matrix.templates.h +++ b/include/deal.II/lac/constraint_matrix.templates.h @@ -1654,6 +1654,7 @@ namespace internals const size_type column, SparseMatrixIterator &matrix_values) { + (void)row; if (value != 0.) { while (matrix_values->column() < column) @@ -2628,6 +2629,7 @@ add_entries_local_to_global (const std::vector &local_dof_indices, actual_dof_indices.resize(n_local_dofs); make_sorted_row_list (local_dof_indices, actual_dof_indices); const size_type n_actual_dofs = actual_dof_indices.size(); + (void)n_actual_dofs; // additional construct that also takes care of block indices. std::vector &block_starts = scratch_data->block_starts; diff --git a/include/deal.II/lac/full_matrix.templates.h b/include/deal.II/lac/full_matrix.templates.h index 1b7c9c0c3e..a03c01200e 100644 --- a/include/deal.II/lac/full_matrix.templates.h +++ b/include/deal.II/lac/full_matrix.templates.h @@ -1789,6 +1789,7 @@ FullMatrix::gauss_jordan () for (size_type i=0; i::compress_start (const unsigned int counter, ::dealii::VectorOperation::values operation) { + (void)counter; + (void)operation; Assert (vector_is_ghosted == false, ExcMessage ("Cannot call compress() on a ghosted vector")); @@ -386,12 +388,9 @@ namespace parallel if (compress_requests.size() > 0) { int ierr = MPI_Startall(compress_requests.size(),&compress_requests[0]); + (void)ierr; Assert (ierr == MPI_SUCCESS, ExcInternalError()); } - -#else // ifdef DEAL_II_WITH_MPI - (void)counter; - (void)operation; #endif } @@ -434,6 +433,7 @@ namespace parallel { int ierr = MPI_Waitall (n_import_targets, &compress_requests[0], MPI_STATUSES_IGNORE); + (void)ierr; Assert (ierr == MPI_SUCCESS, ExcInternalError()); Number *read_position = import_data; @@ -466,6 +466,7 @@ namespace parallel int ierr = MPI_Waitall (n_ghost_targets, &compress_requests[n_import_targets], MPI_STATUSES_IGNORE); + (void)ierr; Assert (ierr == MPI_SUCCESS, ExcInternalError()); } else @@ -558,6 +559,7 @@ namespace parallel { int ierr = MPI_Startall(update_ghost_values_requests.size(), &update_ghost_values_requests[0]); + (void)ierr; Assert (ierr == MPI_SUCCESS, ExcInternalError()); } #else @@ -585,6 +587,7 @@ namespace parallel int ierr = MPI_Waitall (update_ghost_values_requests.size(), &update_ghost_values_requests[0], MPI_STATUSES_IGNORE); + (void)ierr; Assert (ierr == MPI_SUCCESS, ExcInternalError()); } #endif diff --git a/include/deal.II/lac/petsc_block_vector.h b/include/deal.II/lac/petsc_block_vector.h index c443584382..2fc9a57f97 100644 --- a/include/deal.II/lac/petsc_block_vector.h +++ b/include/deal.II/lac/petsc_block_vector.h @@ -302,6 +302,7 @@ namespace PETScWrappers // first set sizes of blocks, but // don't initialize them as we will // copy elements soon + (void)end; reinit (n, true); InputIterator start = first; for (unsigned int b=0; b SparseMatrix & SparseMatrix::operator = (const SparseMatrix &m) { + (void)m; Assert (m.cols==0, ExcInvalidConstructorCall()); Assert (m.val==0, ExcInvalidConstructorCall()); Assert (m.max_len==0, ExcInvalidConstructorCall()); @@ -102,6 +103,7 @@ SparseMatrix::SparseMatrix (const SparsityPattern &c, val(0), max_len(0) { + (void)id; Assert (c.n_rows() == id.m(), ExcDimensionMismatch (c.n_rows(), id.m())); Assert (c.n_cols() == id.n(), ExcDimensionMismatch (c.n_cols(), id.n())); @@ -145,6 +147,7 @@ template SparseMatrix & SparseMatrix::operator = (const double d) { + (void)d; Assert (d==0, ExcScalarAssignmentOnlyForZeroValue()); Assert (cols != 0, ExcNotInitialized()); @@ -180,6 +183,7 @@ template SparseMatrix & SparseMatrix::operator= (const IdentityMatrix &id) { + (void)id; Assert (cols->n_rows() == id.m(), ExcDimensionMismatch (cols->n_rows(), id.m())); Assert (cols->n_cols() == id.n(), @@ -384,6 +388,7 @@ SparseMatrix::copy_from (const TrilinosWrappers::SparseMatrix &matrix) (row, matrix.row_length(row), ncols, &(value_cache[0]), reinterpret_cast(&(colnum_cache[0]))); + (void)ierr; Assert (ierr==0, ExcTrilinosError(ierr)); // resize arrays to the size actually used @@ -1338,6 +1343,8 @@ namespace "preconditioner. If it is correct that there are " "zeros on the diagonal, then you will have to chose " "a different preconditioner.")); +#else + (void)matrix; #endif } } diff --git a/include/deal.II/lac/sparse_matrix_ez.templates.h b/include/deal.II/lac/sparse_matrix_ez.templates.h index 4fe449fc5d..9580e77c54 100644 --- a/include/deal.II/lac/sparse_matrix_ez.templates.h +++ b/include/deal.II/lac/sparse_matrix_ez.templates.h @@ -66,6 +66,7 @@ template SparseMatrixEZ & SparseMatrixEZ::operator= (const SparseMatrixEZ &m) { + (void)m; Assert (m.empty(), ExcInvalidConstructorCall()); return *this; } @@ -75,6 +76,7 @@ template SparseMatrixEZ & SparseMatrixEZ::operator = (const double d) { + (void)d; Assert (d==0, ExcScalarAssignmentOnlyForZeroValue()); typename std::vector::iterator e = data.begin(); diff --git a/include/deal.II/lac/trilinos_block_vector.h b/include/deal.II/lac/trilinos_block_vector.h index bdfd91e882..422c54817e 100644 --- a/include/deal.II/lac/trilinos_block_vector.h +++ b/include/deal.II/lac/trilinos_block_vector.h @@ -348,6 +348,7 @@ namespace TrilinosWrappers // first set sizes of blocks, but // don't initialize them as we will // copy elements soon + (void)end; reinit (n, true); InputIterator start = first; for (size_type b=0; b(matrix->DomainMap().NumMyElements())); const size_type src_local_size = src.end() - src.begin(); + (void)src_local_size; AssertDimension (src_local_size, static_cast(matrix->RangeMap().NumMyElements())); Epetra_MultiVector tril_dst (View, matrix->DomainMap(), dst.begin(), diff --git a/include/deal.II/lac/vector.templates.h b/include/deal.II/lac/vector.templates.h index 9aa6f0d261..2d46fd10dd 100644 --- a/include/deal.II/lac/vector.templates.h +++ b/include/deal.II/lac/vector.templates.h @@ -1192,6 +1192,7 @@ namespace internal // work on the regular part. The innermost 32 values are expanded in // order to obtain known loop bounds for most of the work. const Number *X_original = X; + (void)X_original; ResultType outer_results [128]; size_type n_chunks = vec_size / 32; const size_type remainder = vec_size % 32; diff --git a/include/deal.II/multigrid/mg_transfer.h b/include/deal.II/multigrid/mg_transfer.h index 8d8adb3e0a..d6d5ae5bcf 100644 --- a/include/deal.II/multigrid/mg_transfer.h +++ b/include/deal.II/multigrid/mg_transfer.h @@ -52,6 +52,7 @@ namespace internal static void reinit(Matrix &matrix, Sparsity &sparsity, int level, const DSP &dsp, const DH &) { sparsity.copy_from (dsp); + (void)level; matrix.reinit (sparsity); } }; diff --git a/include/deal.II/numerics/vector_tools.templates.h b/include/deal.II/numerics/vector_tools.templates.h index 93fc02cc9e..0a41091f16 100644 --- a/include/deal.II/numerics/vector_tools.templates.h +++ b/include/deal.II/numerics/vector_tools.templates.h @@ -598,6 +598,7 @@ namespace VectorTools { const DH &dof1 = intergridmap.get_source_grid(); const DH &dof2 = intergridmap.get_destination_grid(); + (void)dof2; Assert(u1.size()==dof1.n_dofs(), ExcDimensionMismatch(u1.size(), dof1.n_dofs())); diff --git a/source/base/function.cc b/source/base/function.cc index 826f1bc8a9..91950f7dcc 100644 --- a/source/base/function.cc +++ b/source/base/function.cc @@ -53,6 +53,7 @@ Function::~Function () template Function &Function::operator= (const Function &f) { + (void)f; AssertDimension (n_components, f.n_components); return *this; } @@ -280,6 +281,7 @@ void ZeroFunction::value_list (const std::vector > &poin std::vector &values, const unsigned int /*component*/) const { + (void)points; Assert (values.size() == points.size(), ExcDimensionMismatch(values.size(), points.size())); @@ -373,6 +375,7 @@ template Number ConstantFunction::value (const Point &, const unsigned int component) const { + (void)component; Assert (component < this->n_components, ExcIndexRange (component, 0, this->n_components)); return function_value; @@ -397,6 +400,8 @@ void ConstantFunction::value_list (const std::vector > & std::vector &values, const unsigned int component) const { + (void)points; + (void)component; Assert (component < this->n_components, ExcIndexRange (component, 0, this->n_components)); Assert (values.size() == points.size(), @@ -533,6 +538,7 @@ Number ScalarFunctionFromFunctionObject::value (const Point &p, const unsigned int component) const { + (void)component; Assert (component == 0, ExcMessage ("This object represents only scalar functions")); return function_object (p);