mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-05 05:30:15 +01:00
dbus-send: Reassure the compiler that secondary_type is initialized
It's initialized to a non-trivial value whenever container_type is DBUS_TYPE_DICT_ENTRY, and subsequently only used if container_type is DBUS_TYPE_DICT_ENTRY, but Debian's gcc 7.2.0-7 doesn't seem to be able to infer that any more, causing build failure under -Werror=maybe-uninitialized. Signed-off-by: Simon McVittie <smcv@collabora.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102979 Reviewed-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
e3d15a0d57
commit
7b623b65c6
1 changed files with 2 additions and 0 deletions
|
|
@ -464,6 +464,7 @@ main (int argc, char *argv[])
|
|||
DBusMessageIter container_iter;
|
||||
|
||||
type = DBUS_TYPE_INVALID;
|
||||
secondary_type = DBUS_TYPE_INVALID;
|
||||
arg = argv[i++];
|
||||
c = strchr (arg, ':');
|
||||
|
||||
|
|
@ -544,6 +545,7 @@ main (int argc, char *argv[])
|
|||
}
|
||||
else if (container_type == DBUS_TYPE_DICT_ENTRY)
|
||||
{
|
||||
_dbus_assert (secondary_type != DBUS_TYPE_INVALID);
|
||||
append_dict (target_iter, type, secondary_type, c);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue