[vala/0.36] gdbus: Properly set annotations field of GDBus*Info struct to NULL



commit 3273ca214a5e47c8f2c842f8edade48bf6fc1aff
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Jan 5 21:41:20 2019 +0100

    gdbus: Properly set annotations field of GDBus*Info struct to NULL
    
    Found by -Werror=missing-field-initializers

 codegen/valagdbusmodule.vala | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/codegen/valagdbusmodule.vala b/codegen/valagdbusmodule.vala
index f8bdaa9c8..b7f009b9b 100644
--- a/codegen/valagdbusmodule.vala
+++ b/codegen/valagdbusmodule.vala
@@ -287,6 +287,7 @@ public class Vala.GDBusModule : GVariantModule {
                                info.append (new CCodeConstant ("-1"));
                                info.append (new CCodeConstant ("\"%s\"".printf (param.name)));
                                info.append (new CCodeConstant ("\"%s\"".printf (get_type_signature 
(param.variable_type, param))));
+                               info.append (new CCodeConstant ("NULL"));
 
                                var cdecl = new CCodeDeclaration ("const GDBusArgInfo");
                                cdecl.add_declarator (new CCodeVariableDeclarator ("_" + 
get_ccode_lower_case_prefix (sym) + "dbus_arg_info_" + m.name + "_" + param.name, info));
@@ -305,6 +306,7 @@ public class Vala.GDBusModule : GVariantModule {
                                info.append (new CCodeConstant ("-1"));
                                info.append (new CCodeConstant ("\"%s\"".printf (dbus_result_name (m))));
                                info.append (new CCodeConstant ("\"%s\"".printf (get_type_signature 
(m.return_type, m))));
+                               info.append (new CCodeConstant ("NULL"));
 
                                var cdecl = new CCodeDeclaration ("const GDBusArgInfo");
                                cdecl.add_declarator (new CCodeVariableDeclarator ("_" + 
get_ccode_lower_case_prefix (sym) + "dbus_arg_info_" + m.name + "_result", info));
@@ -332,6 +334,7 @@ public class Vala.GDBusModule : GVariantModule {
                        info.append (new CCodeConstant ("\"%s\"".printf (get_dbus_name_for_member (m))));
                        info.append (new CCodeCastExpression (new CCodeUnaryExpression 
(CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("_" + get_ccode_lower_case_prefix (sym) + 
"dbus_arg_info_" + m.name + "_in")), "GDBusArgInfo **"));
                        info.append (new CCodeCastExpression (new CCodeUnaryExpression 
(CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("_" + get_ccode_lower_case_prefix (sym) + 
"dbus_arg_info_" + m.name + "_out")), "GDBusArgInfo **"));
+                       info.append (new CCodeConstant ("NULL"));
 
                        cdecl = new CCodeDeclaration ("const GDBusMethodInfo");
                        cdecl.add_declarator (new CCodeVariableDeclarator ("_" + get_ccode_lower_case_prefix 
(sym) + "dbus_method_info_" + m.name, info));
@@ -369,6 +372,7 @@ public class Vala.GDBusModule : GVariantModule {
                                info.append (new CCodeConstant ("-1"));
                                info.append (new CCodeConstant ("\"%s\"".printf (param.name)));
                                info.append (new CCodeConstant ("\"%s\"".printf (get_type_signature 
(param.variable_type, param))));
+                               info.append (new CCodeConstant ("NULL"));
 
                                var cdecl = new CCodeDeclaration ("const GDBusArgInfo");
                                cdecl.add_declarator (new CCodeVariableDeclarator ("_" + 
get_ccode_lower_case_prefix (sym) + "dbus_arg_info_" + get_ccode_lower_case_name (sig) + "_" + param.name, 
info));
@@ -389,6 +393,7 @@ public class Vala.GDBusModule : GVariantModule {
                        info.append (new CCodeConstant ("-1"));
                        info.append (new CCodeConstant ("\"%s\"".printf (get_dbus_name_for_member (sig))));
                        info.append (new CCodeCastExpression (new CCodeUnaryExpression 
(CCodeUnaryOperator.ADDRESS_OF, new CCodeIdentifier ("_" + get_ccode_lower_case_prefix (sym) + 
"dbus_arg_info_" + get_ccode_lower_case_name (sig))), "GDBusArgInfo **"));
+                       info.append (new CCodeConstant ("NULL"));
 
                        cdecl = new CCodeDeclaration ("const GDBusSignalInfo");
                        cdecl.add_declarator (new CCodeVariableDeclarator ("_" + get_ccode_lower_case_prefix 
(sym) + "dbus_signal_info_" + get_ccode_lower_case_name (sig), info));
@@ -433,6 +438,7 @@ public class Vala.GDBusModule : GVariantModule {
                        } else {
                                info.append (new CCodeConstant ("G_DBUS_PROPERTY_INFO_FLAGS_NONE"));
                        }
+                       info.append (new CCodeConstant ("NULL"));
 
                        var cdecl = new CCodeDeclaration ("const GDBusPropertyInfo");
                        cdecl.add_declarator (new CCodeVariableDeclarator ("_" + get_ccode_lower_case_prefix 
(sym) + "dbus_property_info_" + prop.name, info));
@@ -459,6 +465,7 @@ public class Vala.GDBusModule : GVariantModule {
                info.append (new CCodeCastExpression (new CCodeUnaryExpression 
(CCodeUnaryOperator.ADDRESS_OF, get_method_info (sym)), "GDBusMethodInfo **"));
                info.append (new CCodeCastExpression (new CCodeUnaryExpression 
(CCodeUnaryOperator.ADDRESS_OF, get_signal_info (sym)), "GDBusSignalInfo **"));
                info.append (new CCodeCastExpression (new CCodeUnaryExpression 
(CCodeUnaryOperator.ADDRESS_OF, get_property_info (sym)), "GDBusPropertyInfo **"));
+               info.append (new CCodeConstant ("NULL"));
 
                var cdecl = new CCodeDeclaration ("const GDBusInterfaceInfo");
                cdecl.add_declarator (new CCodeVariableDeclarator ("_" + get_ccode_lower_case_prefix (sym) + 
"dbus_interface_info", info));


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