[PATCH v2] rtems-utils: Change data type definition

Ryan Long ryan.long at oarcorp.com
Thu Aug 5 20:43:17 UTC 2021


Remove typedef of ostream_guard and change datatype of ostream_guards to
have the namespace in the variable declarations.
---
 linkers/rtems-exeinfo.cpp        | 6 ++----
 tester/covoar/CoverageMapBase.cc | 4 +---
 tester/covoar/ReportsHtml.cc     | 4 +---
 tester/covoar/ReportsText.cc     | 4 +---
 4 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/linkers/rtems-exeinfo.cpp b/linkers/rtems-exeinfo.cpp
index c9bf5b6..caae168 100644
--- a/linkers/rtems-exeinfo.cpp
+++ b/linkers/rtems-exeinfo.cpp
@@ -53,8 +53,6 @@
 #define kill(p,s) raise(s)
 #endif
 
-typedef rtems::utils::ostream_guard ostream_guard;
-
 namespace rld
 {
   namespace exeinfo
@@ -369,7 +367,7 @@ namespace rld
        */
 
       rld::strings all_flags;
-      ostream_guard old_state( std::cout );
+      ::rtems::utils::ostream_guard old_state( std::cout );
 
       size_t source_max = 0;
 
@@ -636,7 +634,7 @@ namespace rld
 
     void image::output_tls ()
     {
-      ostream_guard old_state( std::cout );
+      ::rtems::utils::ostream_guard old_state( std::cout );
 
       symbols::symbol* tls_data_begin = symbols.find_global("_TLS_Data_begin");
       symbols::symbol* tls_data_end = symbols.find_global("_TLS_Data_end");
diff --git a/tester/covoar/CoverageMapBase.cc b/tester/covoar/CoverageMapBase.cc
index 4de9307..334426b 100644
--- a/tester/covoar/CoverageMapBase.cc
+++ b/tester/covoar/CoverageMapBase.cc
@@ -16,8 +16,6 @@
 
 #include "CoverageMapBase.h"
 
-typedef rtems::utils::ostream_guard ostream_guard;
-
 namespace Coverage {
 
   AddressInfo::AddressInfo ()
@@ -78,7 +76,7 @@ namespace Coverage {
 
   void AddressRange::dump (std::ostream& out, bool show_slots) const
   {
-    ostream_guard old_state( out );
+    rtems::utils::ostream_guard old_state( out );
 
     out << std::hex << std::setfill('0')
         << "Address range: low = " << std::setw(8) << lowAddress
diff --git a/tester/covoar/ReportsHtml.cc b/tester/covoar/ReportsHtml.cc
index 2ba3463..314f6a4 100644
--- a/tester/covoar/ReportsHtml.cc
+++ b/tester/covoar/ReportsHtml.cc
@@ -13,8 +13,6 @@
 #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 "
@@ -745,7 +743,7 @@ namespace Coverage {
     const SymbolInformation& symbolInfo
   )
   {
-    ostream_guard old_state( report );
+    rtems::utils::ostream_guard old_state( report );
 
     // Mark the background color different for odd and even lines.
     if ( ( count % 2 ) != 0 ) {
diff --git a/tester/covoar/ReportsText.cc b/tester/covoar/ReportsText.cc
index da42dab..40558d8 100644
--- a/tester/covoar/ReportsText.cc
+++ b/tester/covoar/ReportsText.cc
@@ -11,8 +11,6 @@
 
 #include <rtems-utils.h>
 
-typedef rtems::utils::ostream_guard ostream_guard;
-
 namespace Coverage {
 
 ReportsText::ReportsText(
@@ -162,7 +160,7 @@ bool ReportsText::PutCoverageLine(
 {
   const Coverage::Explanation* explanation;
 
-  ostream_guard oldState( report );
+  rtems::utils::ostream_guard oldState( report );
 
   report << "============================================" << std::endl
          << "Index                : " << range.id << std::endl
-- 
1.8.3.1



More information about the devel mailing list