mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 13:55:29 +00:00
Fix "int vs enum" warnings from armcc v5
enumerated type mixed with another type
This commit is contained in:
parent
7f84905552
commit
a273371fc4
|
@ -1442,7 +1442,7 @@ const cipher_definition_t cipher_definitions[] =
|
|||
{ POLARSSL_CIPHER_NULL, &null_cipher_info },
|
||||
#endif /* POLARSSL_CIPHER_NULL_CIPHER */
|
||||
|
||||
{ 0, NULL }
|
||||
{ POLARSSL_CIPHER_NONE, NULL }
|
||||
};
|
||||
|
||||
#define NUM_CIPHERS sizeof cipher_definitions / sizeof cipher_definitions[0]
|
||||
|
|
|
@ -59,7 +59,7 @@ static const md_info_t *md_info_by_size( size_t min_size )
|
|||
|
||||
for( md_alg = md_list(); *md_alg != 0; md_alg++ )
|
||||
{
|
||||
if( ( md_cur = md_info_from_type( *md_alg ) ) == NULL ||
|
||||
if( ( md_cur = md_info_from_type( (md_type_t) *md_alg ) ) == NULL ||
|
||||
(size_t) md_cur->size < min_size ||
|
||||
( md_picked != NULL && md_cur->size > md_picked->size ) )
|
||||
continue;
|
||||
|
|
|
@ -367,7 +367,7 @@ static const oid_sig_alg_t oid_sig_alg[] =
|
|||
},
|
||||
{
|
||||
{ NULL, 0, NULL, NULL },
|
||||
0, 0,
|
||||
POLARSSL_MD_NONE, POLARSSL_PK_NONE,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -401,7 +401,7 @@ static const oid_pk_alg_t oid_pk_alg[] =
|
|||
},
|
||||
{
|
||||
{ NULL, 0, NULL, NULL },
|
||||
0,
|
||||
POLARSSL_PK_NONE,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -466,7 +466,7 @@ static const oid_ecp_grp_t oid_ecp_grp[] =
|
|||
},
|
||||
{
|
||||
{ NULL, 0, NULL, NULL },
|
||||
0,
|
||||
POLARSSL_ECP_DP_NONE,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -496,7 +496,7 @@ static const oid_cipher_alg_t oid_cipher_alg[] =
|
|||
},
|
||||
{
|
||||
{ NULL, 0, NULL, NULL },
|
||||
0,
|
||||
POLARSSL_CIPHER_NONE,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -549,7 +549,7 @@ static const oid_md_alg_t oid_md_alg[] =
|
|||
},
|
||||
{
|
||||
{ NULL, 0, NULL, NULL },
|
||||
0,
|
||||
POLARSSL_MD_NONE,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -580,7 +580,7 @@ static const oid_pkcs12_pbe_alg_t oid_pkcs12_pbe_alg[] =
|
|||
},
|
||||
{
|
||||
{ NULL, 0, NULL, NULL },
|
||||
0, 0,
|
||||
POLARSSL_MD_NONE, POLARSSL_CIPHER_NONE,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -198,7 +198,7 @@ int pkcs12_pbe( asn1_buf *pbe_params, int mode,
|
|||
if( ( ret = cipher_init_ctx( &cipher_ctx, cipher_info ) ) != 0 )
|
||||
goto exit;
|
||||
|
||||
if( ( ret = cipher_setkey( &cipher_ctx, key, 8 * keylen, mode ) ) != 0 )
|
||||
if( ( ret = cipher_setkey( &cipher_ctx, key, 8 * keylen, (operation_t) mode ) ) != 0 )
|
||||
goto exit;
|
||||
|
||||
if( ( ret = cipher_set_iv( &cipher_ctx, iv, cipher_info->iv_size ) ) != 0 )
|
||||
|
|
|
@ -201,7 +201,7 @@ int pkcs5_pbes2( asn1_buf *pbe_params, int mode,
|
|||
if( ( ret = cipher_init_ctx( &cipher_ctx, cipher_info ) ) != 0 )
|
||||
goto exit;
|
||||
|
||||
if( ( ret = cipher_setkey( &cipher_ctx, key, 8 * keylen, mode ) ) != 0 )
|
||||
if( ( ret = cipher_setkey( &cipher_ctx, key, 8 * keylen, (operation_t) mode ) ) != 0 )
|
||||
goto exit;
|
||||
|
||||
if( ( ret = cipher_crypt( &cipher_ctx, iv, enc_scheme_params.len,
|
||||
|
|
|
@ -526,7 +526,7 @@ int rsa_rsaes_oaep_encrypt( rsa_context *ctx,
|
|||
if( f_rng == NULL )
|
||||
return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
|
||||
|
||||
md_info = md_info_from_type( ctx->hash_id );
|
||||
md_info = md_info_from_type( (md_type_t) ctx->hash_id );
|
||||
if( md_info == NULL )
|
||||
return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
|
||||
|
||||
|
@ -705,7 +705,7 @@ int rsa_rsaes_oaep_decrypt( rsa_context *ctx,
|
|||
if( ilen < 16 || ilen > sizeof( buf ) )
|
||||
return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
|
||||
|
||||
md_info = md_info_from_type( ctx->hash_id );
|
||||
md_info = md_info_from_type( (md_type_t) ctx->hash_id );
|
||||
if( md_info == NULL )
|
||||
return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
|
||||
|
||||
|
@ -943,7 +943,7 @@ int rsa_rsassa_pss_sign( rsa_context *ctx,
|
|||
hashlen = md_get_size( md_info );
|
||||
}
|
||||
|
||||
md_info = md_info_from_type( ctx->hash_id );
|
||||
md_info = md_info_from_type( (md_type_t) ctx->hash_id );
|
||||
if( md_info == NULL )
|
||||
return( POLARSSL_ERR_RSA_BAD_INPUT_DATA );
|
||||
|
||||
|
|
|
@ -1674,7 +1674,9 @@ static const ssl_ciphersuite_t ciphersuite_definitions[] =
|
|||
#endif /* POLARSSL_DES_C */
|
||||
#endif /* POLARSSL_ENABLE_WEAK_CIPHERSUITES */
|
||||
|
||||
{ 0, "", 0, 0, 0, 0, 0, 0, 0, 0 }
|
||||
{ 0, "",
|
||||
POLARSSL_CIPHER_NONE, POLARSSL_MD_NONE, POLARSSL_KEY_EXCHANGE_NONE,
|
||||
0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
#if defined(SSL_CIPHERSUITES)
|
||||
|
|
Loading…
Reference in a new issue