From: Daniel Arndt Date: Thu, 17 Jan 2019 22:40:24 +0000 (+0100) Subject: Fix build warnings and errors for complex PETSc X-Git-Tag: v9.1.0-rc1~432^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7608%2Fhead;p=dealii.git Fix build warnings and errors for complex PETSc --- diff --git a/source/numerics/data_out_stack.cc b/source/numerics/data_out_stack.cc index 336ddeba53..63617f359f 100644 --- a/source/numerics/data_out_stack.cc +++ b/source/numerics/data_out_stack.cc @@ -104,6 +104,7 @@ DataOutStack::declare_data_vector( const std::vector &names, const VectorType vector_type) { +#ifdef DEBUG // make sure this function is // not called after some parameter // values have already been @@ -114,7 +115,6 @@ DataOutStack::declare_data_vector( // used twice for (const auto &name : names) { - (void)name; for (const auto &data_set : dof_data) for (const auto &data_set_name : data_set.names) Assert(name != data_set_name, ExcNameAlreadyUsed(name)); @@ -123,6 +123,7 @@ DataOutStack::declare_data_vector( for (const auto &data_set_name : data_set.names) Assert(name != data_set_name, ExcNameAlreadyUsed(name)); } +#endif switch (vector_type) { diff --git a/source/numerics/matrix_tools_once.cc b/source/numerics/matrix_tools_once.cc index 21efb2f41f..a641490780 100644 --- a/source/numerics/matrix_tools_once.cc +++ b/source/numerics/matrix_tools_once.cc @@ -135,9 +135,8 @@ namespace MatrixTools } solution.set(indices, solution_values); - // now also set appropriate values for - // the rhs - for (double &solution_value : solution_values) + // now also set appropriate values for the rhs + for (auto &solution_value : solution_values) solution_value *= average_nonzero_diagonal_entry; right_hand_side.set(indices, solution_values);