[rtems-tools commit] ReportsHtml.cc: Restore ostream format

Joel Sherrill joel at rtems.org
Tue Jul 27 18:42:01 UTC 2021


Module:    rtems-tools
Branch:    master
Commit:    f7887ec5c3d478e66efbf0604a2ad4c46dba4ff4
Changeset: http://git.rtems.org/rtems-tools/commit/?id=f7887ec5c3d478e66efbf0604a2ad4c46dba4ff4

Author:    Ryan Long <ryan.long at oarcorp.com>
Date:      Thu Jul 15 13:21:51 2021 -0400

ReportsHtml.cc: Restore ostream format

CID 1505939: Not restoring ofstream format

Save format of stream before changing it, and change it back before returning.

Closes #4471

---

 tester/covoar/ReportsHtml.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tester/covoar/ReportsHtml.cc b/tester/covoar/ReportsHtml.cc
index 53ee0c1..e276732 100644
--- a/tester/covoar/ReportsHtml.cc
+++ b/tester/covoar/ReportsHtml.cc
@@ -6,6 +6,7 @@
 #include <iomanip>
 
 #include <rld.h>
+#include <rtems-utils.h>
 
 #include "ReportsHtml.h"
 #include "app_common.h"
@@ -13,6 +14,8 @@
 #include "DesiredSymbols.h"
 #include "ObjdumpProcessor.h"
 
+typedef rtems::utils::ostream_guard ostream_guard;
+
 #if 0
 #define TABLE_HEADER_CLASS \
   " table-autopage:10 table-page-number:pagenum table-page-count:pages "
@@ -724,6 +727,7 @@ namespace Coverage {
     const SymbolInformation& symbolInfo
   )
   {
+    ostream_guard old_state( report );
 
     // Mark the background color different for odd and even lines.
     if ( ( count % 2 ) != 0 ) {
@@ -818,6 +822,7 @@ namespace Coverage {
     }
 
     report << "</tr>" << std::endl;
+
     return true;
   }
 



More information about the vc mailing list