]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix various uninitialized and unused variables 4076/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 17 Mar 2017 10:37:46 +0000 (11:37 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 17 Mar 2017 14:19:58 +0000 (15:19 +0100)
include/deal.II/base/quadrature_point_data.h
include/deal.II/base/thread_management.h
include/deal.II/integrators/l2.h
include/deal.II/lac/solver_bicgstab.h
include/deal.II/lac/solver_minres.h
include/deal.II/lac/solver_richardson.h
include/deal.II/meshworker/functional.h

index f3a4b5ff278534c342cbcfa86284112819f912e9..9ed971d6fde07d4e0380263a54f6669b322575d4 100644 (file)
@@ -792,7 +792,7 @@ namespace parallel
     template<int dim, typename DataType>
     void ContinuousQuadratureDataTransfer<dim,DataType>::pack_function
     (const typename parallel::distributed::Triangulation<dim,dim>::cell_iterator &cell,
-     const typename parallel::distributed::Triangulation<dim,dim>::CellStatus status,
+     const typename parallel::distributed::Triangulation<dim,dim>::CellStatus /*status*/,
      void *data)
     {
       double *data_store = reinterpret_cast<double *>(data);
@@ -815,6 +815,7 @@ namespace parallel
     {
       Assert ((status!=parallel::distributed::Triangulation<dim,dim>::CELL_COARSEN),
               ExcNotImplemented());
+      (void) status;
 
       const double *data_store = reinterpret_cast<const double *>(data);
 
index 1e9d9a5b82d4164056d4b672c7adeec1d295dd3a..8d6b35d8f72a4e09e3a643d3c31dd7b62c59abb5 100644 (file)
@@ -2904,6 +2904,7 @@ namespace Threads
     TaskDescriptor<RT>::TaskDescriptor (const std_cxx11::function<RT ()> &function)
       :
       function (function),
+      task(NULL),
       task_is_done (false)
     {}
 
index b064bcec49c253689d78cf0158698da9f7e6f765..8b675c9f606e9cd54c8747d5c5b8ca8d41a62466 100644 (file)
@@ -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);
index f081d5f8b5f15619f51cb50f952e0f22f5ef1121..2a68bb2905818d540b1c7a0cce7c25c03cfd5854 100644 (file)
@@ -23,6 +23,7 @@
 #include <deal.II/lac/solver_control.h>
 #include <cmath>
 #include <deal.II/base/subscriptor.h>
+#include <deal.II/base/signaling_nan.h>
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -295,6 +296,22 @@ SolverBicgstab<VectorType>::SolverBicgstab (SolverControl        &cn,
                                             const AdditionalData &data)
   :
   Solver<VectorType>(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<double>()),
   additional_data(data)
 {}
 
index 0699ff7149b8777794e9c9691ccae2f3294f5fcb..2ce525dcbc6bf1a3b64680ad85a8e8297d7991be 100644 (file)
@@ -23,6 +23,7 @@
 #include <deal.II/base/logstream.h>
 #include <cmath>
 #include <deal.II/base/subscriptor.h>
+#include <deal.II/base/signaling_nan.h>
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -167,7 +168,15 @@ template<class VectorType>
 SolverMinRes<VectorType>::SolverMinRes (SolverControl        &cn,
                                         const AdditionalData &)
   :
-  Solver<VectorType>(cn)
+  Solver<VectorType>(cn),
+  Vu0(NULL),
+  Vu1(NULL),
+  Vu2(NULL),
+  Vm0(NULL),
+  Vm1(NULL),
+  Vm2(NULL),
+  Vv(NULL),
+  res2(numbers::signaling_nan<double>())
 {}
 
 
index 7c657809bfff7902bfd5251ee02c253caa9598d4..324af8b4a812f1a365f67494d4f82c6bb4cd0a55 100644 (file)
@@ -22,6 +22,7 @@
 #include <deal.II/lac/solver.h>
 #include <deal.II/lac/solver_control.h>
 #include <deal.II/base/subscriptor.h>
+#include <deal.II/base/signaling_nan.h>
 
 DEAL_II_NAMESPACE_OPEN
 
@@ -207,7 +208,8 @@ SolverRichardson<VectorType>::SolverRichardson(SolverControl        &cn,
   Solver<VectorType> (cn),
   Vr(NULL),
   Vd(NULL),
-  additional_data(data)
+  additional_data(data),
+  res(numbers::signaling_nan<double>())
 {}
 
 
index 9e0b9b6bc11714f8dd18b8b29bc7bedae2de39a9..dbba023c6cde573cd0313234a3a8a00f35c4e368 100644 (file)
@@ -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 <typename number>
+    inline
+    CellsAndFaces<number>::CellsAndFaces()
+      : separate_faces(true)
+    {}
+
+
+
     template <typename number>
     inline void
     CellsAndFaces<number>::initialize(AnyData &r, bool sep)

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.