mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-02-21 06:40:50 +00:00
Fix 32 bit unreachable code build failure
Given the size of ciL is set dependant on MBEDTLS_HAVE_INT32 / MBEDTLS_HAVE_INT64, clang rightfully reports this as unreachable code in 32 bit builds. Fix this by using #define guards instead. Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
parent
cd70070c25
commit
215ed131cf
@ -5577,9 +5577,9 @@ int mbedtls_ecp_mod_p448_raw(mbedtls_mpi_uint *X, size_t X_limbs)
|
||||
(void) mbedtls_mpi_core_add(X, X, Q, Q_limbs);
|
||||
|
||||
/* M = B0 */
|
||||
if (ciL > 4) {
|
||||
M[P224_WIDTH_MIN] &= ((mbedtls_mpi_uint)-1) >> (P224_UNUSED_BITS);
|
||||
}
|
||||
#ifdef MBEDTLS_HAVE_INT64
|
||||
M[P224_WIDTH_MIN] &= ((mbedtls_mpi_uint)-1) >> (P224_UNUSED_BITS);
|
||||
#endif
|
||||
memset(M + P224_WIDTH_MAX, 0, ((M_limbs - P224_WIDTH_MAX) * ciL));
|
||||
|
||||
/* M = M + Q = B0 + B1 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user