[PATCH rtems-tools v1 2/4] GcovFunctionData.cc: Initialize member variables

Ryan Long ryan.long at oarcorp.com
Wed Sep 1 20:00:04 UTC 2021


CID 1399640: Uninitialized pointer field

Closes #4432
---
 tester/covoar/GcovFunctionData.cc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/tester/covoar/GcovFunctionData.cc b/tester/covoar/GcovFunctionData.cc
index aec04ce..847439b 100644
--- a/tester/covoar/GcovFunctionData.cc
+++ b/tester/covoar/GcovFunctionData.cc
@@ -19,9 +19,13 @@ namespace Gcov {
 
   GcovFunctionData::GcovFunctionData()
   {
-    numberOfArcs   = 0;
-    numberOfBlocks = 0;
-    coverageMap    = NULL;
+    id              = 0;
+    checksum        = 0;
+    firstLineNumber = 0;
+    numberOfBlocks  = 0;
+    numberOfArcs    = 0;
+    coverageMap     = NULL;
+    symbolInfo      = NULL;
   }
 
   GcovFunctionData::~GcovFunctionData()
-- 
1.8.3.1



More information about the devel mailing list