From 4a491b99dfe77aa9643cfcfd286646261e5a4e3c Mon Sep 17 00:00:00 2001 From: Antti Yli-Tokola Date: Wed, 20 Nov 2019 22:36:25 +0200 Subject: [PATCH] Update mbed-coap to version 5.1.2 Compiler warning cleanups. --- features/frameworks/mbed-coap/CHANGELOG.md | 7 +++++ .../frameworks/mbed-coap/doxygen/libcoap_doxy | 2 +- .../mbed-coap/source/sn_coap_protocol.c | 29 +------------------ 3 files changed, 9 insertions(+), 29 deletions(-) diff --git a/features/frameworks/mbed-coap/CHANGELOG.md b/features/frameworks/mbed-coap/CHANGELOG.md index ad1af8d2b0..a33acec038 100644 --- a/features/frameworks/mbed-coap/CHANGELOG.md +++ b/features/frameworks/mbed-coap/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [v5.1.2](https://github.com/ARMmbed/mbed-coap/releases/tag/v5.1.2) + +- Compiler warning cleanups. + +-[Full Changelog](https://github.com/ARMmbed/mbed-coap/compare/v5.1.1...v5.1.2) + + ## [v5.1.1](https://github.com/ARMmbed/mbed-coap/releases/tag/v5.1.1) - Delay the random initialization of message id to a later phase and not during init() so there is enough time diff --git a/features/frameworks/mbed-coap/doxygen/libcoap_doxy b/features/frameworks/mbed-coap/doxygen/libcoap_doxy index c1b2c80c13..b7a1035d5f 100644 --- a/features/frameworks/mbed-coap/doxygen/libcoap_doxy +++ b/features/frameworks/mbed-coap/doxygen/libcoap_doxy @@ -675,7 +675,7 @@ WARN_LOGFILE = # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = ../nsdl-c +INPUT = ../mbed-coap # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is diff --git a/features/frameworks/mbed-coap/source/sn_coap_protocol.c b/features/frameworks/mbed-coap/source/sn_coap_protocol.c index 6a6f939e19..e3e156ead3 100644 --- a/features/frameworks/mbed-coap/source/sn_coap_protocol.c +++ b/features/frameworks/mbed-coap/source/sn_coap_protocol.c @@ -62,7 +62,6 @@ static uint8_t *sn_coap_protocol_linked_list_blockwise_payload_ static coap_blockwise_payload_s *sn_coap_protocol_linked_list_blockwise_search(struct coap_s *handle, const sn_nsdl_addr_s *src_addr_ptr, const uint8_t *token_ptr, uint8_t token_len); static bool sn_coap_protocol_linked_list_blockwise_payload_search_compare_block_number(struct coap_s *handle, const sn_nsdl_addr_s *src_addr_ptr, const uint8_t *token_ptr, uint8_t token_len, uint32_t block_number); static void sn_coap_protocol_linked_list_blockwise_payload_remove(struct coap_s *handle, coap_blockwise_payload_s *removed_payload_ptr); -static void sn_coap_protocol_linked_list_blockwise_payload_remove_oldest(struct coap_s *handle, uint8_t *token_ptr, uint8_t token_len); static uint32_t sn_coap_protocol_linked_list_blockwise_payloads_get_len(struct coap_s *handle, const sn_nsdl_addr_s *src_addr_ptr, const uint8_t *token_ptr, uint8_t token_len); static void sn_coap_protocol_handle_blockwise_timout(struct coap_s *handle); static sn_coap_hdr_s *sn_coap_handle_blockwise_message(struct coap_s *handle, sn_nsdl_addr_s *src_addr_ptr, sn_coap_hdr_s *received_coap_msg_ptr, void *param); @@ -1465,32 +1464,6 @@ static bool sn_coap_protocol_linked_list_blockwise_payload_search_compare_block_ return false; } -/**************************************************************************//** - * \fn static void sn_coap_protocol_linked_list_blockwise_payload_remove_oldest(struct coap_s *handle) - * - * \brief Removes current stored blockwise paylod from Linked list - *****************************************************************************/ - -static void sn_coap_protocol_linked_list_blockwise_payload_remove_oldest(struct coap_s *handle, uint8_t *token_ptr, uint8_t token_len) -{ - /* Remove oldest node in Linked list*/ - if (token_ptr) { - ns_list_foreach(coap_blockwise_payload_s, removed_payload_ptr, &handle->linked_list_blockwise_received_payloads) { - if ((token_len == removed_payload_ptr->token_len) && !memcmp(removed_payload_ptr->token_ptr, token_ptr, token_len)) { - sn_coap_protocol_linked_list_blockwise_payload_remove(handle, removed_payload_ptr); - return; - } - } - } else { - ns_list_foreach(coap_blockwise_payload_s, removed_payload_ptr, &handle->linked_list_blockwise_received_payloads) { - if (!removed_payload_ptr->token_ptr) { - sn_coap_protocol_linked_list_blockwise_payload_remove(handle, removed_payload_ptr); - return; - } - } - } -} - /**************************************************************************//** * \fn static void sn_coap_protocol_linked_list_blockwise_payload_remove(struct coap_s *handle, * coap_blockwise_msg_s *removed_msg_ptr) @@ -2286,7 +2259,7 @@ static bool sn_coap_handle_last_blockwise(struct coap_s *handle, const sn_nsdl_a uint32_t whole_payload_len = sn_coap_protocol_linked_list_blockwise_payloads_get_len(handle, src_addr_ptr, received_coap_msg_ptr->token_ptr, received_coap_msg_ptr->token_len); uint8_t *payload_ptr = sn_coap_protocol_linked_list_blockwise_payload_search(handle, src_addr_ptr, &payload_len, received_coap_msg_ptr->token_ptr, received_coap_msg_ptr->token_len); - tr_debug("sn_coap_handle_last_blockwise - whole len %d", whole_payload_len); + tr_debug("sn_coap_handle_last_blockwise - whole len %" PRIu32, whole_payload_len); if (!whole_payload_len) { return false; }