mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 08:49:01 +00:00
up the msvc warning level on srtp
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3099 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
25273b6d9d
commit
e415095df3
@ -49,6 +49,9 @@
|
||||
#include "aes_icm.h"
|
||||
#include "alloc.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4100)
|
||||
#endif
|
||||
|
||||
debug_module_t mod_aes_icm = {
|
||||
0, /* debugging is off by default */
|
||||
@ -367,7 +370,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
|
||||
@ -415,7 +418,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];
|
||||
|
@ -155,7 +155,7 @@ cipher_type_self_test(const cipher_type_t *ct) {
|
||||
test_case->ciphertext_length_octets));
|
||||
|
||||
/* compare the resulting ciphertext with that in the test case */
|
||||
if (len != test_case->ciphertext_length_octets)
|
||||
if ((int)len != test_case->ciphertext_length_octets)
|
||||
return err_status_algo_fail;
|
||||
status = err_status_ok;
|
||||
for (i=0; i < test_case->ciphertext_length_octets; i++)
|
||||
@ -222,7 +222,7 @@ cipher_type_self_test(const cipher_type_t *ct) {
|
||||
test_case->plaintext_length_octets));
|
||||
|
||||
/* compare the resulting plaintext with that in the test case */
|
||||
if (len != test_case->plaintext_length_octets)
|
||||
if ((int)len != test_case->plaintext_length_octets)
|
||||
return err_status_algo_fail;
|
||||
status = err_status_ok;
|
||||
for (i=0; i < test_case->plaintext_length_octets; i++)
|
||||
@ -344,7 +344,7 @@ cipher_type_self_test(const cipher_type_t *ct) {
|
||||
octet_string_hex_string(buffer, length));
|
||||
|
||||
/* compare the resulting plaintext with the original one */
|
||||
if (length != plaintext_len)
|
||||
if ((int)length != plaintext_len)
|
||||
return err_status_algo_fail;
|
||||
status = err_status_ok;
|
||||
for (i=0; i < plaintext_len; i++)
|
||||
|
@ -48,6 +48,10 @@
|
||||
#include "null_cipher.h"
|
||||
#include "alloc.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4100)
|
||||
#endif
|
||||
|
||||
/* the null_cipher uses the cipher debug module */
|
||||
|
||||
extern debug_module_t mod_cipher;
|
||||
|
@ -48,6 +48,10 @@
|
||||
#include "null_auth.h"
|
||||
#include "alloc.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4100)
|
||||
#endif
|
||||
|
||||
/* null_auth uses the auth debug module */
|
||||
|
||||
extern debug_module_t mod_auth;
|
||||
|
@ -42,6 +42,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4100)
|
||||
#endif
|
||||
|
||||
#include "err.h"
|
||||
|
||||
#ifdef ERR_REPORTING_SYSLOG
|
||||
|
@ -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 */
|
||||
}
|
||||
/* NOTREACHED */
|
||||
return -1; /* this keeps compilers from complaining */
|
||||
/* this flags an error */
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
@ -179,7 +178,7 @@ hex_string_to_octet_string(char *raw, char *hex, int len) {
|
||||
tmp = hex_char_to_nibble(hex[0]);
|
||||
if (tmp == -1)
|
||||
return hex_len;
|
||||
x = (tmp << 4);
|
||||
x = (uint8_t)(tmp << 4);
|
||||
hex_len++;
|
||||
tmp = hex_char_to_nibble(hex[1]);
|
||||
if (tmp == -1)
|
||||
@ -564,8 +563,6 @@ base64_char_to_sextet(uint8_t c) {
|
||||
return 63;
|
||||
case '=':
|
||||
return 64;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@ -586,7 +583,7 @@ base64_string_to_octet_string(char *raw, char *base64, int len) {
|
||||
tmp = base64_char_to_sextet(base64[0]);
|
||||
if (tmp == -1)
|
||||
return base64_len;
|
||||
x = (tmp << 6);
|
||||
x = (uint8_t)(tmp << 6);
|
||||
base64_len++;
|
||||
tmp = base64_char_to_sextet(base64[1]);
|
||||
if (tmp == -1)
|
||||
|
@ -28,7 +28,7 @@ stat_test_monobit(uint8_t *data) {
|
||||
|
||||
ones_count = 0;
|
||||
while (data < data_end) {
|
||||
ones_count += octet_get_weight(*data);
|
||||
ones_count = (uint16_t)(ones_count + octet_get_weight(*data));
|
||||
data++;
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,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);
|
||||
v128_left_shift(&rdbx->bitmask, delta);
|
||||
v128_set_bit(&rdbx->bitmask, 127);
|
||||
} else {
|
||||
|
@ -47,6 +47,9 @@
|
||||
|
||||
#include "ut_sim.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable:4100)
|
||||
#endif
|
||||
|
||||
int
|
||||
ut_compar(const void *a, const void *b) {
|
||||
|
@ -97,7 +97,7 @@ rand_source_get_octet_string(void *dest, uint32_t len) {
|
||||
/* rand() returns 0-32767 (ugh) */
|
||||
/* Is this a good enough way to get random bytes?
|
||||
It is if it passes FIPS-140... */
|
||||
*dst++ = val & 0xff;
|
||||
*dst++ = (uint8_t)(val & 0xff);
|
||||
len--;
|
||||
}
|
||||
#endif
|
||||
|
@ -52,6 +52,7 @@ extern "C" {
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack(4)
|
||||
#pragma warning(disable:4214)
|
||||
#endif
|
||||
|
||||
#include "crypto_kernel.h"
|
||||
|
@ -52,7 +52,8 @@
|
||||
RuntimeLibrary="3"
|
||||
StructMemberAlignment="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
@ -119,7 +120,8 @@
|
||||
RuntimeLibrary="2"
|
||||
StructMemberAlignment="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
@ -189,7 +191,8 @@
|
||||
RuntimeLibrary="3"
|
||||
StructMemberAlignment="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
@ -271,7 +274,8 @@
|
||||
RuntimeLibrary="2"
|
||||
StructMemberAlignment="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
WarningLevel="4"
|
||||
WarnAsError="true"
|
||||
Detect64BitPortabilityProblems="true"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user