From: David Wells Date: Thu, 18 Aug 2016 03:04:59 +0000 (-0400) Subject: These were caught by cppcheck. X-Git-Tag: v8.5.0-rc1~758^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca02788992249c59264f6ea97ba0be2cb05f681e;p=dealii.git These were caught by cppcheck. --- diff --git a/include/deal.II/lac/matrix_lib.templates.h b/include/deal.II/lac/matrix_lib.templates.h index 3b9ade0aa4..9c1f7f805a 100644 --- a/include/deal.II/lac/matrix_lib.templates.h +++ b/include/deal.II/lac/matrix_lib.templates.h @@ -76,8 +76,6 @@ MeanValueFilter::filter(BlockVector &v) const for (unsigned int i=0; i::solve (const MatrixType &A, const VectorType &b, const PreconditionerType &precondition) { - SolverControl::State conv=SolverControl::iterate; - deallog.push("minres"); // Memory allocation @@ -274,8 +272,7 @@ SolverMinRes::solve (const MatrixType &A, m[1]->reinit(b); m[2]->reinit(b); - conv = this->iteration_status(0, r_l2, x); - + SolverControl::State conv = this->iteration_status(0, r_l2, x); while (conv==SolverControl::iterate) { if (delta[1]!=0) diff --git a/include/deal.II/matrix_free/shape_info.templates.h b/include/deal.II/matrix_free/shape_info.templates.h index 42af09ee40..b49ded7650 100644 --- a/include/deal.II/matrix_free/shape_info.templates.h +++ b/include/deal.II/matrix_free/shape_info.templates.h @@ -53,8 +53,7 @@ namespace internal const FiniteElement &fe_in, const unsigned int base_element_number) { - const FiniteElement *fe = &fe_in; - fe = &fe_in.base_element(base_element_number); + const FiniteElement *fe = &fe_in.base_element(base_element_number); Assert (fe->n_components() == 1, ExcMessage("FEEvaluation only works for scalar finite elements.")); diff --git a/source/distributed/tria.cc b/source/distributed/tria.cc index 2276533de1..e3c2104b21 100644 --- a/source/distributed/tria.cc +++ b/source/distributed/tria.cc @@ -3688,8 +3688,8 @@ namespace parallel { //at least one of the children belongs to us, so //make sure we set the level subdomain id - types::subdomain_id mark = numbers::artificial_subdomain_id; - mark = cell->child(0)->level_subdomain_id(); + const types::subdomain_id mark = + cell->child(0)->level_subdomain_id(); Assert(mark != numbers::artificial_subdomain_id, ExcInternalError()); //we should know the child(0) cell->set_level_subdomain_id(mark); break;