From 6d4eb133d871d426e2c769b0ecaa55a897c767ae Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 25 Sep 2017 16:19:39 +0100 Subject: [PATCH] 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 --- tools/dbus-send.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/dbus-send.c b/tools/dbus-send.c index 0dc1f5b3..235e58e5 100644 --- a/tools/dbus-send.c +++ b/tools/dbus-send.c @@ -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 -- 2.14.1