From ab04f3924fcf3a02a5144ef29e6622ffe0e64fef Mon Sep 17 00:00:00 2001 From: jcmichelou Date: Thu, 29 Jun 2017 19:20:39 +0200 Subject: [PATCH] Fix compilation warnings with gcc. --- include/coap/net.h | 2 ++ src/coap_session.c | 2 -- src/coap_tinydtls.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/coap/net.h b/include/coap/net.h index a62583a9..77ef149f 100644 --- a/include/coap/net.h +++ b/include/coap/net.h @@ -565,4 +565,6 @@ coap_pdu_t *coap_wellknown_response(coap_context_t *context, coap_session_t *session, coap_pdu_t *request); +unsigned int calc_timeout(unsigned char r); + #endif /* _COAP_NET_H_ */ diff --git a/src/coap_session.c b/src/coap_session.c index 4d045d2d..00df6d6c 100644 --- a/src/coap_session.c +++ b/src/coap_session.c @@ -134,8 +134,6 @@ ssize_t coap_session_send(coap_session_t *session, const uint8_t *data, size_t d return bytes_written; } -unsigned int calc_timeout(unsigned char r); - ssize_t coap_session_delay_pdu(coap_session_t *session, coap_pdu_t *pdu, coap_queue_t *node) diff --git a/src/coap_tinydtls.c b/src/coap_tinydtls.c index 2502204e..31165d08 100644 --- a/src/coap_tinydtls.c +++ b/src/coap_tinydtls.c @@ -19,7 +19,7 @@ #include #include -static coap_time_t dtls_tick_0 = 0; +static dtls_tick_t dtls_tick_0 = 0; static coap_tick_t coap_tick_0 = 0; /* Prototypes from dtls_debug.h as including that header will conflict @@ -367,6 +367,7 @@ coap_dtls_hello(coap_session_t *session, } unsigned int coap_dtls_get_overhead(coap_session_t *session) { + (void)session; return 13 + 8 + 8; }