From 1630888aa080f8421a2d8de1f5477c2b347ce53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 1 Dec 2015 10:27:00 +0100 Subject: [PATCH] Fix two more compiler warnings - declaration after statement - always true comparison due to limited range of operand --- library/bignum.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/library/bignum.c b/library/bignum.c index 76c958b8b..ca05f7731 100644 --- a/library/bignum.c +++ b/library/bignum.c @@ -1217,6 +1217,10 @@ int mbedtls_mpi_mul_int( mbedtls_mpi *X, const mbedtls_mpi *A, mbedtls_mpi_uint static mbedtls_mpi_uint mbedtls_int_div_int(mbedtls_mpi_uint u1, mbedtls_mpi_uint u0, mbedtls_mpi_uint d, mbedtls_mpi_uint *r) { +#if defined(MBEDTLS_HAVE_UDBL) + mbedtls_t_udbl dividend, quotient; +#endif + /* * Check for overflow */ @@ -1228,9 +1232,6 @@ static mbedtls_mpi_uint mbedtls_int_div_int(mbedtls_mpi_uint u1, } #if defined(MBEDTLS_HAVE_UDBL) - mbedtls_t_udbl dividend; - mbedtls_mpi_uint quotient; - dividend = (mbedtls_t_udbl) u1 << biL; dividend |= (mbedtls_t_udbl) u0; quotient = dividend / d;