Merge pull request #8084 from AgathiyanB/remove-type-qualifier-in-assignment-casts

Remove type qualifier in assignment casts
This commit is contained in:
Gilles Peskine 2023-08-24 18:02:11 +00:00 committed by GitHub
commit 2a296729d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,2 @@
Bugfix
* Fix IAR compiler warnings.

View file

@ -189,8 +189,8 @@ static inline unsigned char mbedtls_ct_uchar_in_range_if(unsigned char low,
unsigned char c, unsigned char c,
unsigned char t) unsigned char t)
{ {
const unsigned char co = (const unsigned char) mbedtls_ct_compiler_opaque(c); const unsigned char co = (unsigned char) mbedtls_ct_compiler_opaque(c);
const unsigned char to = (const unsigned char) mbedtls_ct_compiler_opaque(t); const unsigned char to = (unsigned char) mbedtls_ct_compiler_opaque(t);
/* low_mask is: 0 if low <= c, 0x...ff if low > c */ /* low_mask is: 0 if low <= c, 0x...ff if low > c */
unsigned low_mask = ((unsigned) co - low) >> 8; unsigned low_mask = ((unsigned) co - low) >> 8;