diff --git a/libs/srtp/crypto/cipher/aes_icm.c b/libs/srtp/crypto/cipher/aes_icm.c index 5bf4803570..3219a15778 100644 --- a/libs/srtp/crypto/cipher/aes_icm.c +++ b/libs/srtp/crypto/cipher/aes_icm.c @@ -387,7 +387,7 @@ aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c, for (i=0; i < (bytes_to_encr/sizeof(v128_t)); i++) { /* fill buffer with new keystream */ - aes_icm_advance_ismacryp(c, forIsmacryp); + aes_icm_advance_ismacryp(c, (uint8_t)forIsmacryp); /* * add keystream into the data buffer (this would be a lot faster @@ -435,7 +435,7 @@ aes_icm_encrypt_ismacryp(aes_icm_ctx_t *c, if ((bytes_to_encr & 0xf) != 0) { /* fill buffer with new keystream */ - aes_icm_advance_ismacryp(c, forIsmacryp); + aes_icm_advance_ismacryp(c, (uint8_t)forIsmacryp); for (i=0; i < (bytes_to_encr & 0xf); i++) *buf++ ^= c->keystream_buffer.v8[i]; diff --git a/libs/srtp/crypto/math/stat.c b/libs/srtp/crypto/math/stat.c index 5e46c209e3..a744f91f88 100644 --- a/libs/srtp/crypto/math/stat.c +++ b/libs/srtp/crypto/math/stat.c @@ -24,7 +24,7 @@ debug_module_t mod_stat = { err_status_t stat_test_monobit(uint8_t *data) { uint8_t *data_end = data + STAT_TEST_DATA_LEN; - uint16_t ones_count; + int ones_count; ones_count = 0; while (data < data_end) { diff --git a/libs/srtp/crypto/replay/rdbx.c b/libs/srtp/crypto/replay/rdbx.c index 54671cab0c..f13e334bf8 100644 --- a/libs/srtp/crypto/replay/rdbx.c +++ b/libs/srtp/crypto/replay/rdbx.c @@ -292,7 +292,7 @@ rdbx_add_index(rdbx_t *rdbx, int delta) { if (delta > 0) { /* shift forward by delta */ - index_advance(&rdbx->index, delta); + index_advance(&rdbx->index, (sequence_number_t)delta); bitvector_left_shift(&rdbx->bitmask, delta); bitvector_set_bit(&rdbx->bitmask, bitvector_get_length(&rdbx->bitmask) - 1); } else { diff --git a/libs/srtp/include/srtp_priv.h b/libs/srtp/include/srtp_priv.h index cf2274eb65..79f43980cf 100644 --- a/libs/srtp/include/srtp_priv.h +++ b/libs/srtp/include/srtp_priv.h @@ -69,12 +69,12 @@ */ typedef struct { - unsigned char cc:4; /* CSRC count */ - unsigned char x:1; /* header extension flag */ - unsigned char p:1; /* padding flag */ - unsigned char version:2; /* protocol version */ - unsigned char pt:7; /* payload type */ - unsigned char m:1; /* marker bit */ + unsigned cc:4; /* CSRC count */ + unsigned x:1; /* header extension flag */ + unsigned p:1; /* padding flag */ + unsigned version:2; /* protocol version */ + unsigned pt:7; /* payload type */ + unsigned m:1; /* marker bit */ uint16_t seq; /* sequence number */ uint32_t ts; /* timestamp */ uint32_t ssrc; /* synchronization source */ @@ -112,10 +112,10 @@ typedef struct { #ifndef WORDS_BIGENDIAN typedef struct { - unsigned char rc:5; /* reception report count */ - unsigned char p:1; /* padding flag */ - unsigned char version:2; /* protocol version */ - unsigned char pt:8; /* payload type */ + unsigned rc:5; /* reception report count */ + unsigned p:1; /* padding flag */ + unsigned version:2; /* protocol version */ + unsigned pt:8; /* payload type */ uint16_t len; /* length */ uint32_t ssrc; /* synchronization source */ } srtcp_hdr_t;