Skip to content

Commit

Permalink
wolfcrypt/src/random.c: restore outer cast in array_add() to avoid -W…
Browse files Browse the repository at this point in the history
…conversion added in b28e22a, itself a fix for a defect added in ed11669 (root cause of warning is implicit type promotion).
  • Loading branch information
douzzer committed Jul 25, 2024
1 parent 42930b2 commit b40913e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wolfcrypt/src/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--;
Expand Down

0 comments on commit b40913e

Please sign in to comment.