From 2ff035512f663ea47e627ad70767213eca2aa8ea Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 25 Jan 2016 16:28:06 -0500 Subject: [PATCH] Cleared Coverity finding STREAM_FORMAT_STATE --- validat3.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/validat3.cpp b/validat3.cpp index 84f18f49..fbdfcef1 100644 --- a/validat3.cpp +++ b/validat3.cpp @@ -61,10 +61,8 @@ bool HashModuleTest(HashTransformation &md, const HashTestTuple *testSet, unsign bool pass=true, fail; SecByteBlock digest(md.DigestSize()); - // Coverity finding (http://stackoverflow.com/a/30968371 does not squash the finding) - std::ostringstream out; - out.copyfmt(cout); - + // Coverity finding, also see http://stackoverflow.com/a/34509163/608639. + StreamState ss(cout); for (unsigned int i=0; i