From: David Wells Date: Wed, 1 Mar 2017 17:55:48 +0000 (-0500) Subject: Restore stream flags after use. X-Git-Tag: v8.5.0-rc1~82^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3081e38a1ffea2b26d4314845fd34dac155e27d5;p=dealii.git Restore stream flags after use. This was caught by Coverity. --- diff --git a/source/base/table_handler.cc b/source/base/table_handler.cc index 4f1099b75d..2c7e18d4db 100644 --- a/source/base/table_handler.cc +++ b/source/base/table_handler.cc @@ -16,6 +16,8 @@ #include #include +#include + #include #include #include @@ -322,6 +324,7 @@ void TableHandler::write_text(std::ostream &out, const TextOutputFormat format) const { AssertThrow (out, ExcIO()); + boost::io::ios_flags_saver restore_flags(out); // first pad the table from below if necessary if (auto_fill_mode == true) diff --git a/source/lac/trilinos_epetra_vector.cc b/source/lac/trilinos_epetra_vector.cc index b42db82a21..a034f0d579 100644 --- a/source/lac/trilinos_epetra_vector.cc +++ b/source/lac/trilinos_epetra_vector.cc @@ -20,6 +20,9 @@ #ifdef DEAL_II_WITH_MPI #include + +#include + #include "Epetra_Import.h" #include "Epetra_Map.h" #include "Epetra_MpiComm.h" @@ -482,6 +485,7 @@ namespace LinearAlgebra const bool across) const { AssertThrow(out, ExcIO()); + boost::io::ios_flags_saver restore_flags(out); // Get a representation of the vector and loop over all // the elements diff --git a/source/lac/trilinos_vector_base.cc b/source/lac/trilinos_vector_base.cc index 5bfcf9b55a..523081785c 100644 --- a/source/lac/trilinos_vector_base.cc +++ b/source/lac/trilinos_vector_base.cc @@ -25,6 +25,8 @@ DEAL_II_DISABLE_EXTRA_DIAGNOSTICS # include # include + +# include DEAL_II_ENABLE_EXTRA_DIAGNOSTICS @@ -487,6 +489,7 @@ namespace TrilinosWrappers const bool across) const { AssertThrow (out, ExcIO()); + boost::io::ios_flags_saver restore_flags(out); // get a representation of the // vector and loop over all