From 0b3bde57f10e5eba3697fca3e8d32c5cc050abb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Thu, 10 Jun 2021 09:34:00 +0200 Subject: [PATCH] Silence MSVC type conversion warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- library/bignum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/bignum.c b/library/bignum.c index 47a7b98e8639..0c758c5097ea 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -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: @@ -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--;