1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-04-23 10:25:35 +03:00

Silence a warning from Clang >=15 about an unused local variable

The assembly code uses t only on some architectures. Fixes #7166.

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-02-24 12:08:01 +01:00
parent 809c3d5003
commit d784833a1b
2 changed files with 4 additions and 2 deletions

View File

@ -0,0 +1,3 @@
Bugfix
* Silence a warning about an unused local variable in bignum.c on
some architectures. Fixes #7166.

View File

@ -1427,6 +1427,7 @@ void mpi_mul_hlp(size_t i,
mbedtls_mpi_uint b)
{
mbedtls_mpi_uint c = 0, t = 0;
(void) t; /* Unused in some architectures */
#if defined(MULADDC_HUIT)
for (; i >= 8; i -= 8) {
@ -1472,8 +1473,6 @@ void mpi_mul_hlp(size_t i,
}
#endif /* MULADDC_HUIT */
t++;
while (c != 0) {
*d += c; c = (*d < c); d++;
}