[rtems-tools commit] GcovData.cc: Add ostream_guard

Joel Sherrill joel at rtems.org
Fri Aug 13 19:01:54 UTC 2021


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

Author:    Ryan Long <ryan.long at oarcorp.com>
Date:      Wed Aug 11 16:11:51 2021 -0400

GcovData.cc: Add ostream_guard

CID 1506202: Not restoring ostream format

Closes #4483

---

 tester/covoar/GcovData.cc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tester/covoar/GcovData.cc b/tester/covoar/GcovData.cc
index 02e7489..d4acfa4 100644
--- a/tester/covoar/GcovData.cc
+++ b/tester/covoar/GcovData.cc
@@ -16,6 +16,7 @@
 //#include "CoverageMap.h"
 //#include "qemu-traces.h"
 
+#include "rtems-utils.h"
 
 namespace Gcov {
 
@@ -401,6 +402,8 @@ namespace Gcov {
   {
     int length;
 
+    rtems::utils::ostream_guard old_state( std::cerr );
+
     length = sizeof( gcov_preamble );
     gcovFile.read( (char *) &preamble, 4 * sizeof( gcov_preamble ) );
     if ( gcovFile.gcount() != 4 * sizeof( gcov_preamble ) ) {



More information about the vc mailing list