From 8701fb33c7a549babe1b498f2e53f8e1364553e3 Mon Sep 17 00:00:00 2001 From: Jean-Claude Michelou Date: Tue, 31 Jul 2018 18:50:55 +0700 Subject: [PATCH] pdu.c: Remove downcast warning. --- src/pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pdu.c b/src/pdu.c index eb4da80d..5b06f7bc 100644 --- a/src/pdu.c +++ b/src/pdu.c @@ -492,7 +492,7 @@ coap_pdu_parse_header(coap_pdu_t *pdu, coap_proto_t proto) { if (pdu->token_length > pdu->alloc_size) { /* Invalid PDU provided - not wise to assert here though */ coap_log(LOG_DEBUG, "coap_pdu_parse: PDU header token size broken\n"); - pdu->token_length = pdu->alloc_size; + pdu->token_length = (uint8_t)pdu->alloc_size; return 0; } return 1;