summaryrefslogtreecommitdiff
path: root/third_party/srtp
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2009-04-28 19:38:43 +0000
committerNanang Izzuddin <nanang@teluu.com>2009-04-28 19:38:43 +0000
commit7a0ee1a7208ddfe8575d1f1179f66fda2fa99339 (patch)
treea21e4846fd4d08aa06d2f5424cf52042d6d1d9e1 /third_party/srtp
parentcd00a93db99d842d8fcadb60aeb20ba47b4b4165 (diff)
Ticket #706: Merged branch vs-reorg2 into trunk:
- Currently supported platforms are: Win32, WM6 std & pro, WM5 SP & PPC, WM2003 SP & PPC. - Added libpjproject into solution, this is a single 'combo' library that bundles all PJSIP libraries. - Cleaned up most of compile warnings, note that warning level of libgsmcodec has been reduced from 4 to 3. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@2660 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'third_party/srtp')
-rw-r--r--third_party/srtp/crypto/cipher/cipher.c2
-rw-r--r--third_party/srtp/crypto/include/cipher.h4
-rw-r--r--third_party/srtp/crypto/math/datatypes.c5
-rw-r--r--third_party/srtp/include/srtp_priv.h12
4 files changed, 16 insertions, 7 deletions
diff --git a/third_party/srtp/crypto/cipher/cipher.c b/third_party/srtp/crypto/cipher/cipher.c
index b5ef1645..489a52d9 100644
--- a/third_party/srtp/crypto/cipher/cipher.c
+++ b/third_party/srtp/crypto/cipher/cipher.c
@@ -269,7 +269,7 @@ cipher_type_self_test(const cipher_type_t *ct) {
for (j=0; j < NUM_RAND_TESTS; j++) {
unsigned length;
- int plaintext_len;
+ unsigned plaintext_len;
uint8_t key[MAX_KEY_LEN];
uint8_t iv[MAX_KEY_LEN];
diff --git a/third_party/srtp/crypto/include/cipher.h b/third_party/srtp/crypto/include/cipher.h
index 96ee9dc3..f485660c 100644
--- a/third_party/srtp/crypto/include/cipher.h
+++ b/third_party/srtp/crypto/include/cipher.h
@@ -127,9 +127,9 @@ typedef struct cipher_test_case_t {
int key_length_octets; /* octets in key */
uint8_t *key; /* key */
uint8_t *idx; /* packet index */
- int plaintext_length_octets; /* octets in plaintext */
+ unsigned int plaintext_length_octets; /* octets in plaintext */
uint8_t *plaintext; /* plaintext */
- int ciphertext_length_octets; /* octets in plaintext */
+ unsigned int ciphertext_length_octets; /* octets in plaintext */
uint8_t *ciphertext; /* ciphertext */
struct cipher_test_case_t *next_test_case; /* pointer to next testcase */
} cipher_test_case_t;
diff --git a/third_party/srtp/crypto/math/datatypes.c b/third_party/srtp/crypto/math/datatypes.c
index 61bf34fe..331aed8b 100644
--- a/third_party/srtp/crypto/math/datatypes.c
+++ b/third_party/srtp/crypto/math/datatypes.c
@@ -149,10 +149,9 @@ hex_char_to_nibble(uint8_t c) {
case ('E'): return 0xe;
case ('f'): return 0xf;
case ('F'): return 0xf;
- default: return -1; /* this flags an error */
+ default: break; /* this flags an error */
}
- /* NOTREACHED */
- return -1; /* this keeps compilers from complaining */
+ return -1;
}
int
diff --git a/third_party/srtp/include/srtp_priv.h b/third_party/srtp/include/srtp_priv.h
index de273ab3..9214a650 100644
--- a/third_party/srtp/include/srtp_priv.h
+++ b/third_party/srtp/include/srtp_priv.h
@@ -59,6 +59,11 @@
* is not identical)
*/
+#ifdef _MSC_VER
+# pragma warning(push)
+# pragma warning(disable:4214) // bit field types other than int
+#endif
+
#ifndef WORDS_BIGENDIAN
/*
@@ -67,7 +72,6 @@
* "unsigned char", but doing so causes the MS compiler to not
* fully pack the bit fields.
*/
-
typedef struct {
unsigned char cc:4; /* CSRC count */
unsigned char x:1; /* header extension flag */
@@ -95,6 +99,7 @@ typedef struct {
} srtp_hdr_t;
#endif
+
typedef struct {
uint16_t profile_specific; /* profile-specific info */
@@ -157,6 +162,11 @@ typedef struct {
#endif
+#ifdef _MSC_VER
+# pragma warning( pop )
+#endif
+
+
/*
* the following declarations are libSRTP internal functions
*/