]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix some more issues discovered by Coverity 6154/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 3 Apr 2018 23:02:35 +0000 (01:02 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 3 Apr 2018 23:19:34 +0000 (01:19 +0200)
include/deal.II/lac/read_write_vector.h
source/base/data_out_base.cc
source/fe/fe_q_bubbles.cc
source/fe/fe_values.cc
source/fe/mapping_fe_field.cc
source/grid/tria.cc

index f2227d6599fc1684a7260153aa8826e62583c920..5916ca070e95d7ad7959bdd077fa0d152fabae5f 100644 (file)
@@ -723,7 +723,12 @@ namespace LinearAlgebra
   inline
   ReadWriteVector<Number>::~ReadWriteVector ()
   {
-    resize_val(0);
+    try
+      {
+        resize_val(0);
+      }
+    catch (...)
+      {}
   }
 
 
index 075f64c05f418dbea253b69bb85a8cac6ca7ad23..278120a9a1411c23b66dc0a86c2ecd2296f60eb8 100644 (file)
@@ -6496,7 +6496,8 @@ namespace DataOutBase
 
 template <int dim, int spacedim>
 DataOutInterface<dim,spacedim>::DataOutInterface ()
-  : default_subdivisions(1)
+  : default_subdivisions(1),
+    default_fmt(DataOutBase::default_format)
 {}
 
 
index e070b7cbecadbdf57adf892c2185c4abc4dfd6d7..d6b1c9e34bead447724f95e68dc9a10f1af06ac2 100644 (file)
@@ -386,7 +386,8 @@ get_interpolation_matrix (const FiniteElement<dim,spacedim> &x_source_fe,
                                 x_source_fe.dofs_per_cell));
 
   //Provide a short cut in case we are just inquiring the identity
-  if (dynamic_cast<const FEQBUBBLES *>(&x_source_fe)->degree == this->degree)
+  auto casted_fe = dynamic_cast<const FEQBUBBLES *>(&x_source_fe);
+  if (casted_fe != nullptr && casted_fe->degree == this->degree)
     for (unsigned int i=0; i<interpolation_matrix.m(); ++i)
       interpolation_matrix.set(i,i,1.);
   //else we need to do more...
index c02b0f01cdef9ad967240cfff549fad3a8d3d9aa..b4518e7031cb08d2cef30801f5b6618289c40feb 100644 (file)
@@ -2684,6 +2684,7 @@ FEValuesBase<dim,spacedim>::FEValuesBase (const unsigned int n_q_points,
   dofs_per_cell (dofs_per_cell),
   mapping(&mapping, typeid(*this).name()),
   fe(&fe, typeid(*this).name()),
+  cell_similarity(CellSimilarity::Similarity::none),
   fe_values_views_cache (*this)
 {
   Assert (n_q_points > 0,
index 018cd4688edd8dfe31603283eb27591a663a9bb5..0d339c5fada4986c4fcf560f19a15e4fa216f35e 100644 (file)
@@ -61,6 +61,7 @@ MappingFEField<dim,spacedim,VectorType,DoFHandlerType>::InternalData::InternalDa
 (const FiniteElement<dim,spacedim> &fe,
  const ComponentMask                &mask)
   :
+  unit_tangentials (),
   n_shape_functions (fe.dofs_per_cell),
   mask (mask),
   local_dof_indices(fe.dofs_per_cell),
index 2b966022ff93b3287b05ae307ce395486adc600b..ba59ead4e5d7252286fb6ca4653892114dec3863 100644 (file)
@@ -8880,7 +8880,12 @@ template <int dim, int spacedim>
 Triangulation<dim, spacedim>::~Triangulation ()
 {
   // notify listeners that the triangulation is going down...
-  signals.clear();
+  try
+    {
+      signals.clear();
+    }
+  catch (...)
+    {}
 
   levels.clear ();
 

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.