[PATCH 2/3] GcovFunctionData.cc: Add ostream_guard

Ryan Long ryan.long at oarcorp.com
Wed Aug 11 21:09:52 UTC 2021


CID 1506205: Not restoring ostream format

Closes #4484
---
 tester/covoar/GcovFunctionData.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tester/covoar/GcovFunctionData.cc b/tester/covoar/GcovFunctionData.cc
index aec04ce..4db5eba 100644
--- a/tester/covoar/GcovFunctionData.cc
+++ b/tester/covoar/GcovFunctionData.cc
@@ -13,6 +13,7 @@
 #include "ObjdumpProcessor.h"
 #include "CoverageMapBase.h"
 #include "DesiredSymbols.h"
+#include "rtems-utils.h"
 
 
 namespace Gcov {
@@ -367,6 +368,8 @@ namespace Gcov {
   {
     std::list<uint32_t>::iterator line;
 
+    rtems::utils::ostream_guard old_state( textFile );
+
     textFile << " > BLOCK " << std::setw( 3 ) << block->id
              << " from " << block->sourceFileName << std::endl
              << "    -counter: " << std::setw( 5 ) << block->counter
-- 
1.8.3.1



More information about the devel mailing list