From: Daniel Arndt Date: Fri, 17 Mar 2017 10:37:46 +0000 (+0100) Subject: Fix various uninitialized and unused variables X-Git-Tag: v8.5.0-rc1~27^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=074dd55aa653aff36164a04ebf0fac9d2ab470fe;p=dealii.git Fix various uninitialized and unused variables --- diff --git a/include/deal.II/base/quadrature_point_data.h b/include/deal.II/base/quadrature_point_data.h index f3a4b5ff27..9ed971d6fd 100644 --- a/include/deal.II/base/quadrature_point_data.h +++ b/include/deal.II/base/quadrature_point_data.h @@ -792,7 +792,7 @@ namespace parallel template void ContinuousQuadratureDataTransfer::pack_function (const typename parallel::distributed::Triangulation::cell_iterator &cell, - const typename parallel::distributed::Triangulation::CellStatus status, + const typename parallel::distributed::Triangulation::CellStatus /*status*/, void *data) { double *data_store = reinterpret_cast(data); @@ -815,6 +815,7 @@ namespace parallel { Assert ((status!=parallel::distributed::Triangulation::CELL_COARSEN), ExcNotImplemented()); + (void) status; const double *data_store = reinterpret_cast(data); diff --git a/include/deal.II/base/thread_management.h b/include/deal.II/base/thread_management.h index 1e9d9a5b82..8d6b35d8f7 100644 --- a/include/deal.II/base/thread_management.h +++ b/include/deal.II/base/thread_management.h @@ -2904,6 +2904,7 @@ namespace Threads TaskDescriptor::TaskDescriptor (const std_cxx11::function &function) : function (function), + task(NULL), task_is_done (false) {} diff --git a/include/deal.II/integrators/l2.h b/include/deal.II/integrators/l2.h index b064bcec49..8b675c9f60 100644 --- a/include/deal.II/integrators/l2.h +++ b/include/deal.II/integrators/l2.h @@ -221,6 +221,7 @@ namespace LocalIntegrators const unsigned int n_components = fe1.get_fe().n_components(); Assert(n1_dofs == n2_dofs, ExcNotImplemented()); + (void) n2_dofs; AssertDimension(n_components, fe2.get_fe().n_components()); AssertDimension(M11.m(), n1_dofs); AssertDimension(M12.m(), n1_dofs); diff --git a/include/deal.II/lac/solver_bicgstab.h b/include/deal.II/lac/solver_bicgstab.h index f081d5f8b5..2a68bb2905 100644 --- a/include/deal.II/lac/solver_bicgstab.h +++ b/include/deal.II/lac/solver_bicgstab.h @@ -23,6 +23,7 @@ #include #include #include +#include DEAL_II_NAMESPACE_OPEN @@ -295,6 +296,22 @@ SolverBicgstab::SolverBicgstab (SolverControl &cn, const AdditionalData &data) : Solver(cn), + Vx(NULL), + Vr(NULL), + Vrbar(NULL), + Vp(NULL), + Vy(NULL), + Vz(NULL), + Vt(NULL), + Vv(NULL), + Vb(NULL), + alpha(0.), + beta(0.), + omega(0.), + rho(0.), + rhobar(0.), + step(numbers::invalid_unsigned_int), + res(numbers::signaling_nan()), additional_data(data) {} diff --git a/include/deal.II/lac/solver_minres.h b/include/deal.II/lac/solver_minres.h index 0699ff7149..2ce525dcbc 100644 --- a/include/deal.II/lac/solver_minres.h +++ b/include/deal.II/lac/solver_minres.h @@ -23,6 +23,7 @@ #include #include #include +#include DEAL_II_NAMESPACE_OPEN @@ -167,7 +168,15 @@ template SolverMinRes::SolverMinRes (SolverControl &cn, const AdditionalData &) : - Solver(cn) + Solver(cn), + Vu0(NULL), + Vu1(NULL), + Vu2(NULL), + Vm0(NULL), + Vm1(NULL), + Vm2(NULL), + Vv(NULL), + res2(numbers::signaling_nan()) {} diff --git a/include/deal.II/lac/solver_richardson.h b/include/deal.II/lac/solver_richardson.h index 7c657809bf..324af8b4a8 100644 --- a/include/deal.II/lac/solver_richardson.h +++ b/include/deal.II/lac/solver_richardson.h @@ -22,6 +22,7 @@ #include #include #include +#include DEAL_II_NAMESPACE_OPEN @@ -207,7 +208,8 @@ SolverRichardson::SolverRichardson(SolverControl &cn, Solver (cn), Vr(NULL), Vd(NULL), - additional_data(data) + additional_data(data), + res(numbers::signaling_nan()) {} diff --git a/include/deal.II/meshworker/functional.h b/include/deal.II/meshworker/functional.h index 9e0b9b6bc1..dbba023c6c 100644 --- a/include/deal.II/meshworker/functional.h +++ b/include/deal.II/meshworker/functional.h @@ -94,6 +94,11 @@ namespace MeshWorker class CellsAndFaces { public: + /** + * Constructor. Initialize the member variables. + */ + CellsAndFaces(); + /** * The initialization function, specifying the @p results vectors and * whether face data should be collected separately. @@ -198,6 +203,14 @@ namespace MeshWorker //----------------------------------------------------------------------// + template + inline + CellsAndFaces::CellsAndFaces() + : separate_faces(true) + {} + + + template inline void CellsAndFaces::initialize(AnyData &r, bool sep)