[gjs/master.windows: 15/18] gi: Initialize pointer members of wrapper classes



commit 6c00884db0e7846ccc73b55dda34f2e21b8b6923
Author: Philip Chimento <philip chimento gmail com>
Date:   Sun Mar 3 13:58:22 2019 -0800

    gi: Initialize pointer members of wrapper classes
    
    Cppcheck is newly complaining about this, perhaps because of the changes
    to the `friend class` declarations.

 gi/boxed.cpp       | 1 +
 gi/fundamental.cpp | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gi/boxed.cpp b/gi/boxed.cpp
index 7c40d83e..2b5114dd 100644
--- a/gi/boxed.cpp
+++ b/gi/boxed.cpp
@@ -882,6 +882,7 @@ BoxedPrototype::BoxedPrototype(GIStructInfo* info, GType gtype)
       m_zero_args_constructor(-1),
       m_default_constructor(-1),
       m_default_constructor_name(JSID_VOID),
+      m_field_map(nullptr),
       m_can_allocate_directly(struct_is_simple(info)) {
     GJS_INC_COUNTER(boxed_prototype);
 }
diff --git a/gi/fundamental.cpp b/gi/fundamental.cpp
index 8bf25681..0d5d3f6d 100644
--- a/gi/fundamental.cpp
+++ b/gi/fundamental.cpp
@@ -248,7 +248,8 @@ FundamentalPrototype::FundamentalPrototype(GIObjectInfo* info, GType gtype)
       m_ref_function(g_object_info_get_ref_function_pointer(info)),
       m_unref_function(g_object_info_get_unref_function_pointer(info)),
       m_get_value_function(g_object_info_get_get_value_function_pointer(info)),
-      m_set_value_function(g_object_info_get_set_value_function_pointer(info)) {
+      m_set_value_function(g_object_info_get_set_value_function_pointer(info)),
+      m_constructor_info(nullptr) {
     g_assert(m_ref_function);
     g_assert(m_unref_function);
     g_assert(m_set_value_function);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]