eldbus tests - warn - fix func structs/arrays to init every field

This commit is contained in:
Carsten Haitzler 2018-11-08 14:19:43 +00:00
parent 7c075c7431
commit dd4eb20c75
3 changed files with 12 additions and 10 deletions

View File

@ -21,13 +21,15 @@ static Eldbus_Connection *conn;
static const Eldbus_Method methods[] = {
{
FAKE_SERVER_SUM_METHOD_NAME, ELDBUS_ARGS({"i", "a"}, {"i", "b"}), ELDBUS_ARGS({"i", "result"}),
_fake_server_sum
_fake_server_sum,
0
},
{
FAKE_SERVER_PING_METHOD_NAME, ELDBUS_ARGS({"i", "a"}), NULL,
_fake_server_ping
_fake_server_ping,
0
},
{ 0 }
{ NULL, NULL, NULL, NULL, 0 }
};
enum
@ -37,14 +39,14 @@ enum
static const Eldbus_Signal signals[] = {
[FAKE_SERVER_PONG_SIGNAL] = {FAKE_SERVER_PONG_SIGNAL_NAME, ELDBUS_ARGS({ "i", NULL }), 0},
{ 0 }
{ NULL, NULL, 0 }
};
static const Eldbus_Property properties[] = {
{ FAKE_SERVER_READONLY_PROPERTY, "i", _fakse_server_property_get, NULL, 0 },
{ FAKE_SERVER_WRITEONLY_PROPERTY, "i", NULL, _fake_server_property_set, 0 },
{ FAKE_SERVER_READWRITE_PROPERTY, "i", _fakse_server_property_get, _fake_server_property_set, 0 },
{ 0 }
{ NULL, NULL, NULL, NULL, 0 }
};
static const Eldbus_Service_Interface_Desc test_interface_desc = {

View File

@ -199,17 +199,17 @@ static const Eldbus_Method methods[] = {
ELDBUS_ARGS({"ai", "array_of_int"}), _receive_container_data, 0
},
{ "SendBool", ELDBUS_ARGS({"b", "bool"}), ELDBUS_ARGS({"b", "bool"}),
_send_bool
_send_bool, 0
},
{
"SendArrayInt", NULL,
ELDBUS_ARGS({"ai", "array_of_int"}), _send_array_int, 0
},
{ }
{ NULL, NULL, NULL, NULL, 0 }
};
static const Eldbus_Service_Interface_Desc iface_desc = {
"org.freedesktop.Test", methods, NULL
"org.freedesktop.Test", methods, NULL, NULL, NULL, NULL
};
static void

View File

@ -92,11 +92,11 @@ static const Eldbus_Method methods[] = {
"GetMachineId", NULL,
ELDBUS_ARGS({"s", "machine_id"}), NULL, 0
},
{ }
{ NULL, NULL, NULL, NULL, 0 }
};
static const Eldbus_Service_Interface_Desc iface_desc = {
"org.freedesktop.DBus.Peer", methods, NULL
"org.freedesktop.DBus.Peer", methods, NULL, NULL, NULL, NULL
};
static void