Commit 7b623b65 authored by Simon McVittie's avatar Simon McVittie

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's avatarSimon McVittie <smcv@collabora.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=102979Reviewed-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent e3d15a0d
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment