From: Daniel Arndt Date: Tue, 3 Apr 2018 23:02:35 +0000 (+0200) Subject: Fix some more issues discovered by Coverity X-Git-Tag: v9.0.0-rc1~239^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6154%2Fhead;p=dealii.git Fix some more issues discovered by Coverity --- diff --git a/include/deal.II/lac/read_write_vector.h b/include/deal.II/lac/read_write_vector.h index f2227d6599..5916ca070e 100644 --- a/include/deal.II/lac/read_write_vector.h +++ b/include/deal.II/lac/read_write_vector.h @@ -723,7 +723,12 @@ namespace LinearAlgebra inline ReadWriteVector::~ReadWriteVector () { - resize_val(0); + try + { + resize_val(0); + } + catch (...) + {} } diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 075f64c05f..278120a9a1 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -6496,7 +6496,8 @@ namespace DataOutBase template DataOutInterface::DataOutInterface () - : default_subdivisions(1) + : default_subdivisions(1), + default_fmt(DataOutBase::default_format) {} diff --git a/source/fe/fe_q_bubbles.cc b/source/fe/fe_q_bubbles.cc index e070b7cbec..d6b1c9e34b 100644 --- a/source/fe/fe_q_bubbles.cc +++ b/source/fe/fe_q_bubbles.cc @@ -386,7 +386,8 @@ get_interpolation_matrix (const FiniteElement &x_source_fe, x_source_fe.dofs_per_cell)); //Provide a short cut in case we are just inquiring the identity - if (dynamic_cast(&x_source_fe)->degree == this->degree) + auto casted_fe = dynamic_cast(&x_source_fe); + if (casted_fe != nullptr && casted_fe->degree == this->degree) for (unsigned int i=0; i::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, diff --git a/source/fe/mapping_fe_field.cc b/source/fe/mapping_fe_field.cc index 018cd4688e..0d339c5fad 100644 --- a/source/fe/mapping_fe_field.cc +++ b/source/fe/mapping_fe_field.cc @@ -61,6 +61,7 @@ MappingFEField::InternalData::InternalDa (const FiniteElement &fe, const ComponentMask &mask) : + unit_tangentials (), n_shape_functions (fe.dofs_per_cell), mask (mask), local_dof_indices(fe.dofs_per_cell), diff --git a/source/grid/tria.cc b/source/grid/tria.cc index 2b966022ff..ba59ead4e5 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -8880,7 +8880,12 @@ template Triangulation::~Triangulation () { // notify listeners that the triangulation is going down... - signals.clear(); + try + { + signals.clear(); + } + catch (...) + {} levels.clear ();