Re: [PATCH] device: allow for applying IPv4 and IPv6 settings in parallel



On Sat, Sep 17, 2011 at 4:53 AM, Tore Anderson <tore fud no> wrote:
> Problem #1:
> nm-device.c: In function 'handle_dhcp_lease_change':
> nm-device.c:1450:22: error: unused variable 's_ip6' [-Werror=unused-variable]
> cc1: all warnings being treated as errors

As below, you just need to remove it.

>
> Problem #2:
> nm-device.c: In function 'dhcp_state_changed':
> nm-device.c:1477:36: error: 'ip6_config' may be used uninitialized in this function [-Werror=uninitialized]
> nm-device.c:1449:15: note: 'ip6_config' was declared here
>

Set ip6_config to NULL when it's declared at nm-device.c:1449. It will
get assigned something as needed, it's the lines between 1449 and 1477
that do the initialization. If it's still NULL at that point, then at
least it's initialized to NULL and that's what will be passed to
update_ip6_config_with_dhcp(), which will then deal with the issue (if
dhcp info are required and we didn't have anything before, then the
settings from DHCP will be used as ip6_config; otherwise both get
merged).


Mathieu Trudel-Lapierre <mathieu-tl ubuntu com>
Freenode: cyphermox, Jabber: mathieu tl gmail com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]