From 2c3538cb8fc98505123b94e78c1533067e32cc12 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Wed, 11 Jan 2017 23:08:35 +0800 Subject: [PATCH] IPv6: Fix compile error of ip6_frag.c MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix below compile error: ../../../../lwip/src/core/ipv6/ip6_frag.c: In function ‘ip6_reass’: ../../../../lwip/src/core/ipv6/ip6_frag.c:533:20: error: declaration of ‘next_pbuf’ shadows a previous local [-Werror=shadow] struct pbuf* next_pbuf = iprh->next_pbuf; ^~~~~~~~~ ../../../../lwip/src/core/ipv6/ip6_frag.c:272:20: note: shadowed declaration is here struct pbuf *q, *next_pbuf; ^~~~~~~~~ cc1: all warnings being treated as errors ../Common.mk:93: recipe for target 'ip6_frag.o' failed make: *** [ip6_frag.o] Error 1 Fixes: 7cedf7ae7133 ("IPv6: fragment reassembly fixes") Signed-off-by: Axel Lin --- src/core/ipv6/ip6_frag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ipv6/ip6_frag.c b/src/core/ipv6/ip6_frag.c index 0fbb233f..e47cf9df 100644 --- a/src/core/ipv6/ip6_frag.c +++ b/src/core/ipv6/ip6_frag.c @@ -530,7 +530,7 @@ ip6_reass(struct pbuf *p) /* chain together the pbufs contained within the ip6_reassdata list. */ iprh = (struct ip6_reass_helper*) ipr->p->payload; while (iprh != NULL) { - struct pbuf* next_pbuf = iprh->next_pbuf; + next_pbuf = iprh->next_pbuf; if (next_pbuf != NULL) { /* Save next helper struct (will be hidden in next step). */ iprh_tmp = (struct ip6_reass_helper*)next_pbuf->payload;