From 026ca4abdee07d35250dd6137cf859a3be44a81b Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 28 Mar 2011 09:21:39 +0000 Subject: [PATCH] Make compile with gcc-4.6. Avoid some warnings about unused variables. git-svn-id: https://svn.dealii.org/trunk@23540 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/lac/relaxation_block.templates.h | 2 -- .../deal.II/lac/sparse_matrix.templates.h | 10 +++++----- deal.II/include/deal.II/lac/vector.h | 18 +++++++++--------- .../deal.II/numerics/mesh_worker_loop.h | 6 +++--- deal.II/source/lac/sparse_direct.cc | 4 ++-- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/deal.II/include/deal.II/lac/relaxation_block.templates.h b/deal.II/include/deal.II/lac/relaxation_block.templates.h index dbc3a56980..23f197273d 100644 --- a/deal.II/include/deal.II/lac/relaxation_block.templates.h +++ b/deal.II/include/deal.II/lac/relaxation_block.templates.h @@ -103,7 +103,6 @@ RelaxationBlock::invert_diagblocks () // into the matrix for the // diagonal block BlockList::const_iterator row = additional_data.block_list->begin(block); - BlockList::const_iterator end = additional_data.block_list->end(block); for (unsigned int row_cell=0; row_cell::do_step ( x_cell.reinit(bs); // Collect off-diagonal parts BlockList::const_iterator row = additional_data.block_list->begin(block); - BlockList::const_iterator end = additional_data.block_list->end(block); for (unsigned int row_cell=0; row_cell::vmult (OutVector& dst, Assert (!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination()); parallel::apply_to_subranges (0U, m(), - std_cxx1x::bind (internal::SparseMatrix::vmult_on_subrange + std_cxx1x::bind (&internal::SparseMatrix::vmult_on_subrange , _1, _2, val, @@ -681,7 +681,7 @@ SparseMatrix::vmult_add (OutVector& dst, Assert (!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination()); parallel::apply_to_subranges (0U, m(), - std_cxx1x::bind (internal::SparseMatrix::vmult_on_subrange + std_cxx1x::bind (&internal::SparseMatrix::vmult_on_subrange , _1, _2, val, @@ -769,7 +769,7 @@ SparseMatrix::matrix_norm_square (const Vector& v) const return parallel::accumulate_from_subranges - (std_cxx1x::bind (internal::SparseMatrix::matrix_norm_sqr_on_subrange + (std_cxx1x::bind (&internal::SparseMatrix::matrix_norm_sqr_on_subrange >, _1, _2, val, cols->rowstart, cols->colnums, @@ -834,7 +834,7 @@ SparseMatrix::matrix_scalar_product (const Vector& u, return parallel::accumulate_from_subranges - (std_cxx1x::bind (internal::SparseMatrix::matrix_scalar_product_on_subrange + (std_cxx1x::bind (&internal::SparseMatrix::matrix_scalar_product_on_subrange >, _1, _2, val, cols->rowstart, cols->colnums, @@ -1242,7 +1242,7 @@ SparseMatrix::residual (Vector &dst, return std::sqrt (parallel::accumulate_from_subranges - (std_cxx1x::bind (internal::SparseMatrix::residual_sqr_on_subrange + (std_cxx1x::bind (&internal::SparseMatrix::residual_sqr_on_subrange ,Vector >, _1, _2, val, cols->rowstart, cols->colnums, diff --git a/deal.II/include/deal.II/lac/vector.h b/deal.II/include/deal.II/lac/vector.h index 03ce3e7702..25219945ad 100644 --- a/deal.II/include/deal.II/lac/vector.h +++ b/deal.II/include/deal.II/lac/vector.h @@ -958,18 +958,18 @@ class Vector : public Subscriptor */ std::size_t memory_consumption () const; //@} - + /** * Write the data of this object to * a stream for the purpose of serialization. - */ + */ template void save (Archive & ar, const unsigned int version) const; /** - * Read the data of this object + * Read the data of this object * from a stream for the purpose of serialization. - */ + */ template void load (Archive & ar, const unsigned int version); @@ -1494,7 +1494,7 @@ Vector::save (Archive & ar, const unsigned int) const // forward to serialization // function in the base class. ar & static_cast(*this); - + ar & vec_size & max_vec_size ; ar & boost::serialization::make_array(val, max_vec_size); } @@ -1510,9 +1510,9 @@ Vector::load (Archive & ar, const unsigned int) // forward to serialization // function in the base class. ar & static_cast(*this); - + ar & vec_size & max_vec_size ; - + val = new Number[max_vec_size]; ar & boost::serialization::make_array(val, max_vec_size); } @@ -1550,7 +1550,7 @@ inline std::ostream& operator << (std::ostream& os, const Vector& v) { - v.print(os); + v.print(os); return os; } @@ -1563,7 +1563,7 @@ LogStream& operator << (LogStream& os, const Vector& v) { v.print(os); - return os; + return os; } diff --git a/deal.II/include/deal.II/numerics/mesh_worker_loop.h b/deal.II/include/deal.II/numerics/mesh_worker_loop.h index 1584ad9269..89a3e88bb3 100644 --- a/deal.II/include/deal.II/numerics/mesh_worker_loop.h +++ b/deal.II/include/deal.II/numerics/mesh_worker_loop.h @@ -260,9 +260,9 @@ namespace MeshWorker // Loop over all cells #ifdef DEAL_II_MESHWORKER_PARALLEL WorkStream::run(begin, end, - std_cxx1x::bind(cell_action, _1, _3, _2, - cell_worker, boundary_worker, face_worker, cells_first, true), - std_cxx1x::bind(internal::assemble, _1, &assembler), + std_cxx1x::bind(&cell_action, _1, _3, _2, + cell_worker, boundary_worker, face_worker, cells_first, true), + std_cxx1x::bind(&internal::assemble, _1, &assembler), info, dof_info); #else for (ITERATOR cell = begin; cell != end; ++cell) diff --git a/deal.II/source/lac/sparse_direct.cc b/deal.II/source/lac/sparse_direct.cc index a1e9b2111a..30f9448ae6 100644 --- a/deal.II/source/lac/sparse_direct.cc +++ b/deal.II/source/lac/sparse_direct.cc @@ -408,7 +408,7 @@ SparseDirectMA27::~SparseDirectMA27() // avoid compiler warnings //TODO:[WB] Should t be used to trace errors? ssize_t t = write (detached_mode_data->server_client_pipe[1], "7", 1); - t = 0; + (void)t; // then also delete data delete detached_mode_data; detached_mode_data = 0; @@ -462,7 +462,7 @@ SparseDirectMA27::initialize (const SparsityPattern &sp) // warnings //TODO:[WB] Use t to trace errors? int t = pipe(detached_mode_data->server_client_pipe); - t = pipe(detached_mode_data->client_server_pipe); + (void)t; // fflush(NULL) is said to be a // good idea before fork() -- 2.39.5