From 0a36768064ee2869a747446ed8b9d89121ecc1f1 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Wed, 16 Jan 2019 22:40:46 +0100 Subject: [PATCH] dhcpv6-ia: fix compiler warning Fixes : src/dhcpv6-ia.c:1117:22: warning: variable 'onlink' set but not used [-Wunused-but-set-variable] for (size_t i = 0, onlink = false; i < addrlen; ++i) { Signed-off-by: Hans Dedecker --- src/dhcpv6-ia.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dhcpv6-ia.c b/src/dhcpv6-ia.c index c72c4b4..83de0a2 100644 --- a/src/dhcpv6-ia.c +++ b/src/dhcpv6-ia.c @@ -1114,7 +1114,8 @@ static bool dhcpv6_ia_on_link(const struct dhcpv6_ia_hdr *ia, struct dhcpv6_assi (otype != DHCPV6_OPT_IA_ADDR || olen < sizeof(*n) - 4)) continue; - for (size_t i = 0, onlink = false; i < addrlen; ++i) { + onlink = false; + for (size_t i = 0; i < addrlen; ++i) { struct in6_addr addr = addrs[i].addr.in6; if (!valid_addr(&addrs[i], now)) -- 2.25.1