Skip to content
Snippets Groups Projects
Commit 775a8556 authored by Oleg Hahm's avatar Oleg Hahm
Browse files

Merge pull request #3976 from OlegHahm/6lowpan_unused_variable_fix

6lowpan: eliminate unused compiler warning
parents 75a6c631 57888f99
No related branches found
No related tags found
No related merge requests found
...@@ -256,8 +256,10 @@ static void _send(gnrc_pktsnip_t *pkt) ...@@ -256,8 +256,10 @@ static void _send(gnrc_pktsnip_t *pkt)
PRIkernel_pid "\n", iface->max_frag_size, hdr->if_pid); PRIkernel_pid "\n", iface->max_frag_size, hdr->if_pid);
/* IP should not send anything here if it is not a 6LoWPAN interface, /* IP should not send anything here if it is not a 6LoWPAN interface,
* so we don't need to check for NULL pointers */ * so we don't need to check for NULL pointers.
if (datagram_size <= iface->max_frag_size) { * Note, that datagram_size cannot be used here, because the header size
* might be changed by IPHC. */
if (gnrc_pkt_len(pkt2->next) <= iface->max_frag_size) {
DEBUG("6lo: Send SND command for %p to %" PRIu16 "\n", DEBUG("6lo: Send SND command for %p to %" PRIu16 "\n",
(void *)pkt2, hdr->if_pid); (void *)pkt2, hdr->if_pid);
gnrc_netapi_send(hdr->if_pid, pkt2); gnrc_netapi_send(hdr->if_pid, pkt2);
...@@ -276,6 +278,7 @@ static void _send(gnrc_pktsnip_t *pkt) ...@@ -276,6 +278,7 @@ static void _send(gnrc_pktsnip_t *pkt)
gnrc_pktbuf_release(pkt2); gnrc_pktbuf_release(pkt2);
} }
#else #else
(void) datagram_size;
DEBUG("6lo: packet too big (%u > %" PRIu16 ")\n", DEBUG("6lo: packet too big (%u > %" PRIu16 ")\n",
(unsigned int)datagram_size, iface->max_frag_size); (unsigned int)datagram_size, iface->max_frag_size);
gnrc_pktbuf_release(pkt2); gnrc_pktbuf_release(pkt2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment