Parcourir la source

[master] Initialize base_obj in constructor (cppcheck report)

Mukund Sivaraman il y a 12 ans
Parent
commit
310c620141
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      src/lib/python/isc/datasrc/zonetable_accessor_python.cc

+ 5 - 1
src/lib/python/isc/datasrc/zonetable_accessor_python.cc

@@ -34,7 +34,11 @@ namespace {
 // The s_* Class simply covers one instantiation of the object
 class s_ZoneTableAccessor : public PyObject {
 public:
-    s_ZoneTableAccessor() : cppobj(ConstZoneTableAccessorPtr()) {};
+    s_ZoneTableAccessor() :
+        cppobj(ConstZoneTableAccessorPtr()),
+        base_obj(NULL)
+    {}
+
     ConstZoneTableAccessorPtr cppobj;
     // This is a reference to a base object; if the object of this class
     // depends on another object to be in scope during its lifetime,