From ee2d01ed882430a08368abb49ef5409e78a01361 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Mon, 24 Aug 2015 08:49:51 +0200 Subject: [PATCH] fix compiler warnings when passing u16_t to pbuf_header() --- src/core/ipv6/ip6.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/ipv6/ip6.c b/src/core/ipv6/ip6.c index f4bc4af5..eb9bd700 100644 --- a/src/core/ipv6/ip6.c +++ b/src/core/ipv6/ip6.c @@ -589,7 +589,7 @@ netif_found: goto ip6_input_cleanup; } - pbuf_header(p, -hlen); + pbuf_header(p, -(s16_t)hlen); break; case IP6_NEXTH_DESTOPTS: LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Destination options header\n")); @@ -612,7 +612,7 @@ netif_found: goto ip6_input_cleanup; } - pbuf_header(p, -hlen); + pbuf_header(p, -(s16_t)hlen); break; case IP6_NEXTH_ROUTING: LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet with Routing header\n")); @@ -635,7 +635,7 @@ netif_found: goto ip6_input_cleanup; } - pbuf_header(p, -hlen); + pbuf_header(p, -(s16_t)hlen); break; case IP6_NEXTH_FRAGMENT: @@ -669,7 +669,7 @@ netif_found: PP_HTONS(IP6_FRAG_OFFSET_MASK | IP6_FRAG_MORE_FLAG)) == 0) { /* This is a 1-fragment packet, usually a packet that we have * already reassembled. Skip this header anc continue. */ - pbuf_header(p, -hlen); + pbuf_header(p, -(s16_t)hlen); } else { #if LWIP_IPV6_REASS @@ -729,21 +729,21 @@ options_done: case IP6_NEXTH_UDPLITE: #endif /* LWIP_UDPLITE */ /* Point to payload. */ - pbuf_header(p, -ip_data.current_ip_header_tot_len); + pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); udp_input(p, inp); break; #endif /* LWIP_UDP */ #if LWIP_TCP case IP6_NEXTH_TCP: /* Point to payload. */ - pbuf_header(p, -ip_data.current_ip_header_tot_len); + pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); tcp_input(p, inp); break; #endif /* LWIP_TCP */ #if LWIP_ICMP6 case IP6_NEXTH_ICMP6: /* Point to payload. */ - pbuf_header(p, -ip_data.current_ip_header_tot_len); + pbuf_header(p, -(s16_t)ip_data.current_ip_header_tot_len); icmp6_input(p, inp); break; #endif /* LWIP_ICMP */