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. (cherry picked from commit da4052d0037c6bb4981387bb375355f595ab4b1c)
This commit is contained in:
committed by
Luca Boccassi
parent
8334118621
commit
afb572f06e
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user