From: Hauke Mehrtens Date: Fri, 15 Jan 2016 23:03:07 +0000 (+0100) Subject: tinydtls: fix some compile warnings X-Git-Tag: 1.3.0~1057^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9eecb59be058d8a9bc3194ac38cf9903775ab2a9;p=platform%2Fupstream%2Fiotivity.git tinydtls: fix some compile warnings This fixes multiple compiler warnings. Change-Id: I403fb09b6b8ffc4bc1ca2cc03c90605d9005f8d5 Signed-off-by: Hauke Mehrtens Reviewed-on: https://gerrit.iotivity.org/gerrit/4823 Reviewed-by: Dave Thaler Tested-by: jenkins-iotivity Reviewed-by: Soemin Tjong Reviewed-by: Dan Mihai Reviewed-by: Kevin Kane Reviewed-by: Greg Zaverucha Reviewed-by: David Antler Reviewed-by: Randeep Singh --- diff --git a/extlibs/tinydtls/debug.h b/extlibs/tinydtls/debug.h index 89af876..b5c8199 100644 --- a/extlibs/tinydtls/debug.h +++ b/extlibs/tinydtls/debug.h @@ -60,8 +60,6 @@ INLINE_API void check_stack() { } #endif -struct __session_t; - /** Pre-defined log levels akin to what is used in \b syslog. */ typedef enum { DTLS_LOG_EMERG=0, DTLS_LOG_ALERT, DTLS_LOG_CRIT, DTLS_LOG_WARN, DTLS_LOG_NOTICE, DTLS_LOG_INFO, DTLS_LOG_DEBUG @@ -124,7 +122,7 @@ dtls_dsrv_hexdump_log(log_t level, const char *name, const unsigned char *buf, s {} INLINE_API void -dtls_dsrv_log_addr(log_t level, const char *name, const struct __session_t *addr) +dtls_dsrv_log_addr(log_t level, const char *name, const session_t *addr) {} #endif /* NDEBUG */ diff --git a/extlibs/tinydtls/dtls.c b/extlibs/tinydtls/dtls.c index 3b593ce..5f2e400 100644 --- a/extlibs/tinydtls/dtls.c +++ b/extlibs/tinydtls/dtls.c @@ -317,7 +317,8 @@ dtls_create_cookie(dtls_context_t *ctx, uint8 *msg, size_t msglen, uint8 *cookie, int *clen) { unsigned char buf[DTLS_HMAC_MAX]; - size_t len, e; + int len; + size_t e; /* create cookie with HMAC-SHA256 over: * - SECRET @@ -1082,7 +1083,8 @@ static int dtls_update_parameters(dtls_context_t *ctx, dtls_peer_t *peer, uint8 *data, size_t data_length) { - int i, j; + int i; + unsigned int j; int ok; dtls_handshake_parameters_t *config = peer->handshake_params; dtls_security_parameters_t *security = dtls_security_params(peer); @@ -3892,7 +3894,7 @@ handle_handshake_msg(dtls_context_t *ctx, dtls_peer_t *peer, session_t *session, } err = check_server_key_exchange_ecdhe_psk(ctx, peer, data, data_length); } -#endif defined(DTLS_PSK) && defined(DTLS_ECC) +#endif /* defined(DTLS_PSK) && defined(DTLS_ECC) */ #ifdef DTLS_PSK if (is_tls_psk_with_aes_128_ccm_8(peer->handshake_params->cipher)) {