From 1d7f3759929ecb0e322228408fca02b613ee92a4 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Sat, 14 Jan 2017 09:31:06 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20compile=20error=20in=20ip6=5Ffrag.c=20../?= =?UTF-8?q?../../../lwip/src/core/ipv6/ip6=5Ffrag.c:=20In=20function=20?= =?UTF-8?q?=E2=80=98ip6=5Freass=E2=80=99:=20../../../../lwip/src/core/ipv6?= =?UTF-8?q?/ip6=5Ffrag.c:567:7:=20error:=20ISO=20C90=20forbids=20mixed=20d?= =?UTF-8?q?eclarations=20and=20code=20[-Werror=3Dpedantic]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/ipv6/ip6_frag.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/ipv6/ip6_frag.c b/src/core/ipv6/ip6_frag.c index e47cf9df..50d73473 100644 --- a/src/core/ipv6/ip6_frag.c +++ b/src/core/ipv6/ip6_frag.c @@ -559,12 +559,13 @@ ip6_reass(struct pbuf *p) #if IPV6_FRAG_COPYHEADER if (IPV6_FRAG_REQROOM > 0) { + u8_t hdrerr; /* Restore (only) the bytes that we overwrote beyond the fragment header. * Those bytes may belong to either the IPv6 header or an extension * header placed before the fragment header. */ MEMCPY(p->payload, ipr->orig_hdr, IPV6_FRAG_REQROOM); /* get back room for struct ip6_reass_helper (only required if sizeof(void*) > 4) */ - u8_t hdrerr = pbuf_header(p, -(s16_t)(IPV6_FRAG_REQROOM)); + hdrerr = pbuf_header(p, -(s16_t)(IPV6_FRAG_REQROOM)); LWIP_UNUSED_ARG(hdrerr); /* in case of LWIP_NOASSERT */ LWIP_ASSERT("no room for struct ip6_reass_helper", hdrerr == 0); }