From 7821c48e6521149ab0209e7eea3bc6d565b9d306 Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Wed, 25 Oct 2023 23:40:21 -0500 Subject: [PATCH] wolfcrypt/src/sp_int.c: add cast in sp_to_unsigned_bin_len_ct() to mollify -Wconversion. --- wolfcrypt/src/sp_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/sp_int.c b/wolfcrypt/src/sp_int.c index 92ddc1509..284407809 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -17813,7 +17813,7 @@ int sp_to_unsigned_bin_len_ct(const sp_int* a, byte* out, int outSz) d = a->dp[i]; /* Place each byte of a digit into the buffer. */ for (b = 0; (j >= 0) && (b < SP_WORD_SIZEOF); b++) { - out[j--] = (byte)(d & mask); + out[j--] = (byte)((sp_digit)d & mask); d >>= 8; } mask &= (sp_digit)0 - (i < a->used - 1);