platform: fix uninitialized variable bcaddr in build_rtnl_addr()
platform/nm-linux-platform.c: In function 'build_rtnl_addr': platform/nm-linux-platform.c:116:15: error: 'bcaddr' may be used uninitialized in this function [-Werror=maybe-uninitialized] nl_addr_put (*object); ^ platform/nm-linux-platform.c:2264:32: note: 'bcaddr' was declared here auto_nl_addr struct nl_addr *bcaddr; ^
This commit is contained in:
@@ -2261,7 +2261,7 @@ build_rtnl_addr (int family,
|
|||||||
/* IPv4 Broadcast address */
|
/* IPv4 Broadcast address */
|
||||||
if (family == AF_INET) {
|
if (family == AF_INET) {
|
||||||
struct in_addr bcast;
|
struct in_addr bcast;
|
||||||
auto_nl_addr struct nl_addr *bcaddr;
|
auto_nl_addr struct nl_addr *bcaddr = NULL;
|
||||||
|
|
||||||
addr4_to_broadcast (&bcast, addr, plen);
|
addr4_to_broadcast (&bcast, addr, plen);
|
||||||
bcaddr = nl_addr_build (family, &bcast, addrlen);
|
bcaddr = nl_addr_build (family, &bcast, addrlen);
|
||||||
|
Reference in New Issue
Block a user