From: David Wells Date: Sat, 27 Jan 2018 18:23:12 +0000 (-0500) Subject: Initialize some variables. X-Git-Tag: v9.0.0-rc1~505^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1830c0b1c1cfc656b7db4e88a08bb605133d9800;p=dealii.git Initialize some variables. This was found by cppcheck. --- diff --git a/include/deal.II/base/time_stepping.templates.h b/include/deal.II/base/time_stepping.templates.h index bb29c7bdd2..2021a04c56 100644 --- a/include/deal.II/base/time_stepping.templates.h +++ b/include/deal.II/base/time_stepping.templates.h @@ -421,7 +421,8 @@ namespace TimeStepping refine_tol(refine_tol), coarsen_tol(coarsen_tol), last_same_as_first(false), - last_stage(nullptr) + last_stage(nullptr), + status {} { // virtual functions called in constructors and destructors never use the // override in a derived class diff --git a/include/deal.II/meshworker/output.h b/include/deal.II/meshworker/output.h index 4d6f01ffe3..5e50d06ddd 100644 --- a/include/deal.II/meshworker/output.h +++ b/include/deal.II/meshworker/output.h @@ -159,6 +159,8 @@ namespace MeshWorker inline GnuplotPatch::GnuplotPatch() : + n_vectors(numbers::invalid_unsigned_int), + n_points(numbers::invalid_unsigned_int), os(nullptr) {} diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 829fb0b198..d69de3b30b 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -6974,7 +6974,7 @@ void DataOutBase::write_hdf5_parallel (const std::vector > & ExcMessage("DataOutBase was asked to write HDF5 output for a space dimension of 1. " "HDF5 only supports datasets that live in 2 or 3 dimensions.")); - int ierr; + int ierr = 0; (void)ierr; #ifndef DEAL_II_WITH_HDF5 // throw an exception, but first make sure the compiler does not warn about