psa_crypto.c: fix warning on windows compiler

Signed-off-by: Przemyslaw Stekiel <[email protected]>
This commit is contained in:
Przemyslaw Stekiel
2021-11-23 20:02:08 +01:00
parent 14e19e2ad7
commit 204a55df51
+1 -1
View File
@@ -4782,7 +4782,7 @@ static psa_status_t psa_generate_derived_ecc_key_helper(
* (8 * ceiling(m/8) - m) bits of the first byte in
* the string to zero.
*/
uint8_t clear_bit_count = ( 8 * m_bytes - m );
uint8_t clear_bit_count = (uint8_t) ( 8 * m_bytes - m );
uint8_t clear_bit_mask = ( ( 1 << clear_bit_count ) - 1 );
clear_bit_mask = ~( clear_bit_mask << ( 8 - clear_bit_count ) );
*data[0] = ( *data[0] & clear_bit_mask );