From d528b9e0b9a417e9fcea2f395baf8a89376fd978 Mon Sep 17 00:00:00 2001 From: George Nash Date: Mon, 27 Jun 2016 17:09:36 -0700 Subject: [PATCH] Cleaned up type-limits compiler warning pdu.c [-Wtype-limites] the comparison was always true due to the range of data types. Change-Id: If7981691218a3eece4da1941d5d5679266c401a9 Signed-off-by: George Nash Reviewed-on: https://gerrit.iotivity.org/gerrit/8977 Tested-by: jenkins-iotivity Reviewed-by: Jon A. Cruz --- resource/csdk/connectivity/lib/libcoap-4.1.1/pdu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/resource/csdk/connectivity/lib/libcoap-4.1.1/pdu.c b/resource/csdk/connectivity/lib/libcoap-4.1.1/pdu.c index c6efa8d..6a53b0b 100644 --- a/resource/csdk/connectivity/lib/libcoap-4.1.1/pdu.c +++ b/resource/csdk/connectivity/lib/libcoap-4.1.1/pdu.c @@ -278,12 +278,10 @@ coap_transport_type coap_get_tcp_header_type_from_size(unsigned int size) { return coap_tcp_16bit; } - else if (size - COAP_TCP_LENGTH_FIELD_32_BIT < ULONG_MAX) + else //if (size - COAP_TCP_LENGTH_FIELD_32_BIT < ULONG_MAX) always true due to range of data types { return coap_tcp_32bit; } - - return -1; } coap_transport_type coap_get_tcp_header_type_from_initbyte(unsigned int length) -- 2.7.4