[rtems-tools commit] GcovData.cc: Remove ampersands where not needed

Joel Sherrill joel at rtems.org
Mon Aug 23 19:25:50 UTC 2021


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

Author:    Ryan Long <ryan.long at oarcorp.com>
Date:      Mon Aug 23 11:25:35 2021 -0400

GcovData.cc: Remove ampersands where not needed

Removed some ampersands that were left in on accident.

---

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

diff --git a/tester/covoar/GcovData.cc b/tester/covoar/GcovData.cc
index 44928a9..59412a6 100644
--- a/tester/covoar/GcovData.cc
+++ b/tester/covoar/GcovData.cc
@@ -404,7 +404,7 @@ namespace Gcov {
 
     // Read the gcov preamble and make sure it is the right length and has the
     // magic number
-    gcovFile.read( (char *) &preamble, sizeof( gcov_preamble ) );
+    gcovFile.read( (char *) preamble, sizeof( gcov_preamble ) );
     if ( gcovFile.gcount() != sizeof( gcov_preamble ) ) {
       std::cerr << "Error while reading file preamble" << std::endl;
       return -1;
@@ -429,7 +429,7 @@ namespace Gcov {
     char buffer[512];
     char intBuffer[16384];
 
-    gcovFile.read( (char *) &intBuffer, 8 );
+    gcovFile.read( (char *) intBuffer, 8 );
     if ( gcovFile.gcount() != 8 ) {
       std::cerr << "ERROR: Unable to read Function ID & checksum" << std::endl;
       return false;
@@ -443,7 +443,7 @@ namespace Gcov {
     function->setFunctionName( buffer, symbolsToAnalyze_m );
     header.length -= readString( buffer, gcovFile );
     function->setFileName( buffer );
-    gcovFile.read( (char*) &intBuffer, 4 * header.length );
+    gcovFile.read( (char*) intBuffer, 4 * header.length );
     if (gcovFile.gcount() != 4 * header.length ) {
       std::cerr << "ERROR: Unable to read Function starting line number"
                 << std::endl;



More information about the vc mailing list