[Coverity] Not restoring ostream format (STREAM_FORMAT_STATE)
This commit is contained in:
@@ -547,7 +547,7 @@ TestRunnerImpl::PrintReport (TestCase *test, std::ostream *os, bool xml, int lev
|
||||
double user = test->m_result->clock.GetElapsedUser () / MS_PER_SEC;
|
||||
double system = test->m_result->clock.GetElapsedSystem () / MS_PER_SEC;
|
||||
|
||||
(*os).precision (3);
|
||||
std::streamsize oldPrecision = (*os).precision (3);
|
||||
*os << std::fixed;
|
||||
|
||||
std::string statusString = test->IsFailed ()?"FAIL":"PASS";
|
||||
@@ -604,7 +604,8 @@ TestRunnerImpl::PrintReport (TestCase *test, std::ostream *os, bool xml, int lev
|
||||
}
|
||||
}
|
||||
|
||||
os->unsetf(std::ios_base::floatfield);
|
||||
(*os).unsetf(std::ios_base::floatfield);
|
||||
(*os).precision (oldPrecision);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -194,6 +194,8 @@ SpectrumIdealPhyTestCase::DoRun (void)
|
||||
Simulator::Run ();
|
||||
double throughputBps = (g_rxBytes * 8.0) / testDuration;
|
||||
|
||||
std::clog.unsetf(std::ios_base::floatfield);
|
||||
|
||||
if (m_rateIsAchievable)
|
||||
{
|
||||
NS_TEST_ASSERT_MSG_EQ_TOL (throughputBps, m_phyRate, m_phyRate*0.01, "throughput does not match PHY rate");
|
||||
@@ -203,7 +205,6 @@ SpectrumIdealPhyTestCase::DoRun (void)
|
||||
NS_TEST_ASSERT_MSG_EQ (throughputBps, 0.0, "PHY rate is not achievable but throughput is non-zero");
|
||||
}
|
||||
|
||||
std::clog.unsetf(std::ios_base::floatfield);
|
||||
Simulator::Destroy ();
|
||||
}
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ void
|
||||
CtrlBAckResponseHeader::Print (std::ostream &os) const
|
||||
{
|
||||
NS_LOG_FUNCTION (this << &os);
|
||||
os << "TID_INFO=" << m_tidInfo << ", StartingSeq=" << std::hex << m_startingSeq;
|
||||
os << "TID_INFO=" << m_tidInfo << ", StartingSeq=" << std::hex << m_startingSeq << std::dec;
|
||||
}
|
||||
|
||||
uint32_t
|
||||
|
||||
Reference in New Issue
Block a user