From 236211af60028900e95409d8061649d0383f22da Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 31 Jul 2019 10:34:46 -0700 Subject: [PATCH] rtnlutil: fix compiler error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/rtnlutil.c: In function ‘rtnl_route_add’: ./ell/util.h:248:2: error: ‘rtmmsg’ may be used uninitialized in this function [-Werror=maybe-uninitialized] --- src/rtnlutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtnlutil.c b/src/rtnlutil.c index 567accc8..d20b3284 100644 --- a/src/rtnlutil.c +++ b/src/rtnlutil.c @@ -330,7 +330,7 @@ static uint32_t rtnl_route_add(struct l_netlink *rtnl, int ifindex, void *user_data, l_netlink_destroy_func_t destroy) { - L_AUTO_FREE_VAR(struct rtmsg *, rtmmsg); + L_AUTO_FREE_VAR(struct rtmsg *, rtmmsg) = NULL; struct in_addr in_addr; size_t bufsize; void *rta_buf;