1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-30 22:43:08 +03:00

Fix MSVC warnings in library and programs

This commit is contained in:
Manuel Pégourié-Gonnard
2015-07-01 15:51:43 +02:00
parent 7e2d68c1b2
commit 9de64f5af1
7 changed files with 38 additions and 18 deletions

View File

@ -143,7 +143,7 @@ static int ccm_auth_crypt( mbedtls_ccm_context *ctx, int mode, size_t length,
{
int ret;
unsigned char i;
unsigned char q = 16 - 1 - iv_len;
unsigned char q;
size_t len_left, olen;
unsigned char b[16];
unsigned char y[16];
@ -166,6 +166,8 @@ static int ccm_auth_crypt( mbedtls_ccm_context *ctx, int mode, size_t length,
if( add_len > 0xFF00 )
return( MBEDTLS_ERR_CCM_BAD_INPUT );
q = 16 - 1 - (unsigned char) iv_len;
/*
* First block B_0:
* 0 .. 0 flags
@ -257,7 +259,7 @@ static int ccm_auth_crypt( mbedtls_ccm_context *ctx, int mode, size_t length,
while( len_left > 0 )
{
unsigned char use_len = len_left > 16 ? 16 : len_left;
size_t use_len = len_left > 16 ? 16 : len_left;
if( mode == CCM_ENCRYPT )
{