aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>2015-12-01 10:27:00 +0100
committerManuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>2015-12-03 19:09:23 +0100
commit5a8396ed5598475bee607c88f69090ab5d548b73 (patch)
tree813af66c314a130706cfb3535fe99407a17d1470
parent3eab29adc8850a3e46feaa9def714c3f2160d38c (diff)
downloadmbedtls-5a8396ed5598475bee607c88f69090ab5d548b73.zip
mbedtls-5a8396ed5598475bee607c88f69090ab5d548b73.tar.gz
mbedtls-5a8396ed5598475bee607c88f69090ab5d548b73.tar.bz2
Fix two more compiler warnings
- declaration after statement - always true comparison due to limited range of operand
-rw-r--r--library/bignum.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/library/bignum.c b/library/bignum.c
index 76c958b..ca05f77 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;