Fix: use of uninitialized variable in C++ userspace-probe testapp
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Tue, 28 Aug 2018 20:54:31 +0000 (16:54 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 29 Aug 2018 21:32:45 +0000 (17:32 -0400)
Reported-by: Coverity (1395206) Uninitialized scalar variable
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/utils/testapp/userspace-probe-elf-cxx-binary/test_class.cpp
tests/utils/testapp/userspace-probe-elf-cxx-binary/test_class.h

index 8c25f51457fd4b661c21a4b6c7560839504d460b..e673854fec834b80a7f5c27b86fccb10a2a2bed9 100644 (file)
@@ -17,6 +17,9 @@
  */
 
 #include "test_class.h"
+test_class::test_class() {
+       test_member = 1;
+}
 
 void test_class::test_method() {
        test_member += 1;
index 889792dc55b63cde06b7d88683880f2e16229b80..790a00dcde2d2236d901aca737487b4826ea9756 100644 (file)
@@ -19,6 +19,7 @@
 class test_class
 {
 public:
+       test_class();
        void test_method();
        volatile int test_member;
 };
This page took 0.028549 seconds and 4 git commands to generate.