Skip to content

Commit

Permalink
Silence MSVC type conversion warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
  • Loading branch information
mpg committed Jun 11, 2021
1 parent f10d289 commit 0b3bde5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/bignum.c
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,7 @@ static int mpi_select( mbedtls_mpi *R, const mbedtls_mpi *T, size_t T_size, size
for( size_t i = 0; i < T_size; i++ )
{
MBEDTLS_MPI_CHK( mbedtls_mpi_safe_cond_assign( R, &T[i],
mbedtls_mpi_cf_bool_eq( i, idx ) ) );
(unsigned char) mbedtls_mpi_cf_bool_eq( i, idx ) ) );
}

cleanup:
Expand Down Expand Up @@ -2441,7 +2441,7 @@ int mbedtls_mpi_exp_mod( mbedtls_mpi *X, const mbedtls_mpi *A,
/*
* X = X * W[wbits] R^-1 mod N
*/
MBEDTLS_MPI_CHK( mpi_select( &WW, W, 1 << wsize, wbits ) );
MBEDTLS_MPI_CHK( mpi_select( &WW, W, (size_t) 1 << wsize, wbits ) );
mpi_montmul( X, &WW, N, mm, &T );

state--;
Expand Down

0 comments on commit 0b3bde5

Please sign in to comment.