mirror of
https://github.com/Jeffrey-Sardina/liberated-systemd.git
synced 2026-10-19 01:29:53 -05:00
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:
1 parent
e1577aaed6
commit
da4052d003
1 file changed
+3
-3
@@ -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