Fix IAR Warnings

IAR was warning that conditional execution could bypass initialisation of
variables, although those same variables were not used uninitialised.

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott 2023-02-13 15:35:35 +00:00
parent d3d8c852a0
commit 1748de160a
2 changed files with 2 additions and 2 deletions

View File

@ -1,2 +1,2 @@
Bugfix Bugfix
* Fix IAR compiler warnings. Contributed by Glenn Strauss in #3835. * Fix IAR compiler warnings. Fixes #6924.

View File

@ -1656,6 +1656,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
size_t window_bitsize; size_t window_bitsize;
size_t i, j, nblimbs; size_t i, j, nblimbs;
size_t bufsize, nbits; size_t bufsize, nbits;
size_t exponent_bits_in_window = 0;
mbedtls_mpi_uint ei, mm, state; mbedtls_mpi_uint ei, mm, state;
mbedtls_mpi RR, T, W[(size_t) 1 << MBEDTLS_MPI_WINDOW_SIZE], WW, Apos; mbedtls_mpi RR, T, W[(size_t) 1 << MBEDTLS_MPI_WINDOW_SIZE], WW, Apos;
int neg; int neg;
@ -1829,7 +1830,6 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
nblimbs = E->n; nblimbs = E->n;
bufsize = 0; bufsize = 0;
nbits = 0; nbits = 0;
size_t exponent_bits_in_window = 0;
state = 0; state = 0;
while (1) { while (1) {