Use the frag_context variable only when SICSLOWPAN_CONF_FRAG is set.
@@ -1959,6 +1959,7 @@ input(void)
int req_size = uncomp_hdr_len + (uint16_t)(frag_offset << 3)
+ packetbuf_payload_len;
if(req_size > sizeof(uip_buf)) {
+#if SICSLOWPAN_CONF_FRAG
LOG_ERR(
"input: packet and fragment context %u dropped, minimum required IP_BUF size: %d+%d+%d=%d (current size: %u)\n",
frag_context,
@@ -1967,6 +1968,7 @@ input(void)
/* Discard all fragments for this contex, as reassembling this particular fragment would
* cause an overflow in uipbuf */
clear_fragments(frag_context);
+#endif /* SICSLOWPAN_CONF_FRAG */
return;
}
}
