wolfcrypt/src/random.c: restore outer cast in array_add() to avoid -Wconversion added in b28e22aef0, itself a fix for a defect added in ed11669f3c (root cause of warning is implicit type promotion).

This commit is contained in:
Daniel Pouzzner
2024-07-25 15:25:32 -05:00
parent 42930b28f3
commit b40913e80c

View File

@ -594,7 +594,7 @@ static WC_INLINE void array_add(byte* d, word32 dLen, const byte* s, word32 sLen
dIdx = (int)dLen - 1;
for (sIdx = (int)sLen - 1; sIdx >= 0; sIdx--) {
carry += (word16)d[dIdx] + (word16)s[sIdx];
carry += (word16)((word16)d[dIdx] + (word16)s[sIdx]);
d[dIdx] = (byte)carry;
carry >>= 8;
dIdx--;