From fa9217117a9a729b424fde83fcc9a66a733a8282 Mon Sep 17 00:00:00 2001 From: Seven Du Date: Tue, 25 Feb 2014 14:17:28 +0800 Subject: [PATCH] fix compiler warning vs2010 --- libs/srtp/crypto/cipher/aes_gcm_ossl.c | 2 +- libs/srtp/srtp/srtp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/srtp/crypto/cipher/aes_gcm_ossl.c b/libs/srtp/crypto/cipher/aes_gcm_ossl.c index f36ce9d3b2..cb890cb043 100644 --- a/libs/srtp/crypto/cipher/aes_gcm_ossl.c +++ b/libs/srtp/crypto/cipher/aes_gcm_ossl.c @@ -261,7 +261,7 @@ err_status_t aes_gcm_openssl_set_aad (aes_gcm_ctx_t *c, unsigned char *aad, EVP_CIPHER_CTX_ctrl(&c->ctx, EVP_CTRL_GCM_SET_TAG, c->tag_len, aad); rv = EVP_Cipher(&c->ctx, NULL, aad, aad_len); - if (rv != aad_len) { + if (rv != (int)aad_len) { return (err_status_algo_fail); } else { return (err_status_ok); diff --git a/libs/srtp/srtp/srtp.c b/libs/srtp/srtp/srtp.c index 4dbda3e272..e545399719 100644 --- a/libs/srtp/srtp/srtp.c +++ b/libs/srtp/srtp/srtp.c @@ -2330,7 +2330,7 @@ srtp_unprotect_rtcp_aead (srtp_t ctx, srtp_stream_ctx_t *stream, tag_len = auth_get_tag_length(stream->rtcp_auth); /* Validate packet length */ - if (*pkt_octet_len < (octets_in_rtcp_header + tag_len + + if (*pkt_octet_len < (int)(octets_in_rtcp_header + tag_len + sizeof(srtcp_trailer_t))) { return err_status_bad_param; }