bus-message-util: initialize variables to make gcc happy

gcc 13 on armhf complains with -Wmaybe-uninitialized about family, port
and server_name in bus_message_read_dns_array(), even though they are
always set when bus_message_read_dns_one() returns > 0.
This commit is contained in:
Lennart Poettering committed 2026-10-09 18:17:45 +02:00
1 parent e1577aaed6
commit da4052d003
1 file changed
+3 -3
+3 -3
View File
@@ -184,10 +184,10 @@ int bus_message_read_dns_servers(
return r;
for (;;) {
const char *server_name;
const char *server_name = NULL; /* avoid false maybe-uninitialized warning */
union in_addr_union a;
uint16_t port;
int family;
uint16_t port = 0; /* avoid false maybe-uninitialized warning */
int family = AF_UNSPEC; /* avoid false maybe-uninitialized warning */
r = bus_message_read_dns_one(message, reterr_error, extended, &family, &a, &port, &server_name);
if (r < 0)