mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 21:50:11 +01:00
dhcp: workaround "maybe-uninitialized" in dhcp_event_cb()
With LTO we get a compiler warning:
src/dhcp/nm-dhcp-systemd.c: In function dhcp_event_cb:
src/dhcp/nm-dhcp-systemd.c:554: error: lease may be used uninitialized in this function [-Werror=maybe-uninitialized]
554 | r = sd_dhcp_lease_get_server_identifier (lease, &addr);
|
src/dhcp/nm-dhcp-systemd.c:528: note: lease was declared here
528 | sd_dhcp_lease *lease;
|
Fixes: 7f217d0345 ('core: honor the ipv4.dhcp-reject-servers property')
This commit is contained in:
parent
12e8557476
commit
a75dfc73e2
1 changed files with 1 additions and 1 deletions
|
|
@ -525,7 +525,7 @@ dhcp_event_cb (sd_dhcp_client *client, int event, gpointer user_data)
|
|||
NMDhcpSystemd *self = NM_DHCP_SYSTEMD (user_data);
|
||||
NMDhcpSystemdPrivate *priv = NM_DHCP_SYSTEMD_GET_PRIVATE (self);
|
||||
char addr_str[INET_ADDRSTRLEN];
|
||||
sd_dhcp_lease *lease;
|
||||
sd_dhcp_lease *lease = NULL;
|
||||
struct in_addr addr;
|
||||
int r;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue