/home/smcv/src/dbus-1.10/tools/dbus-send.c: In function ‘main’: /home/smcv/src/dbus-1.10/tools/dbus-send.c:185:7: error: ‘secondary_type’ may be used uninitialized in this function [-Werror=maybe-uninitialized] append_arg (&subiter, valtype, val); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/smcv/src/dbus-1.10/tools/dbus-send.c:461:11: note: ‘secondary_type’ was declared here int secondary_type; ^~~~~~~~~~~~~~ Oddly, the same version of gcc seems to be happy with dbus-send from git master, which has equivalent behaviour. The code is essentially this: if (container_type == DICT_ENTRY) secondary_type = ...; ... if (container_type == DICT_ENTRY) call_a_function (secondary_type);
Created attachment 134464 [details] [review] 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.
Comment on attachment 134464 [details] [review] dbus-send: Reassure the compiler that secondary_type is initialized Review of attachment 134464 [details] [review]: ----------------------------------------------------------------- ++
Thanks, fixed in git for 1.11.18 and 1.10.24.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.