]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
reapply several compiler fixes after last commit
authorJeff Lenk <jeff@jefflenk.com>
Fri, 31 Jan 2014 14:54:26 +0000 (08:54 -0600)
committerJeff Lenk <jeff@jefflenk.com>
Fri, 31 Jan 2014 14:54:26 +0000 (08:54 -0600)
libs/srtp/crypto/cipher/aes_icm.c
libs/srtp/crypto/math/stat.c
libs/srtp/crypto/replay/rdbx.c
libs/srtp/include/srtp_priv.h

index 5bf4803570cf03df7d32657c885f5f20c6a6369d..3219a1577877a8dba95a243146650d1bdbb8c983 100644 (file)
@@ -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];
index 5e46c209e3da998804996cfa009d9b3abe28379a..a744f91f88b2998d1436ddee8e1c52cfa64af548 100644 (file)
@@ -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) {
index 54671cab0ca9a7c2d5f504499891c78e3a5a37e8..f13e334bf8f0c3bd43c3f8c58500797f14a62acc 100644 (file)
@@ -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 {
index cf2274eb65dae31823e1befeaba7db50ad3a0608..79f43980cf90e0b2fcce2ff600f839a357cf17c1 100644 (file)
  */
 
 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;