From a748b5264ee9a3bcaeadacd9249efe43379b8e18 Mon Sep 17 00:00:00 2001 From: David Garske Date: Tue, 29 Jun 2021 09:13:32 -0700 Subject: [PATCH] Fix for `wolfcrypt/src/sp_int.c:2720:34: error: left shift count >= width of type` with mingw64. --- 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 2b4ec7542..6cee7fb50 100644 --- a/wolfcrypt/src/sp_int.c +++ b/wolfcrypt/src/sp_int.c @@ -2717,7 +2717,7 @@ int sp_count_bits(const sp_int* a) r *= SP_WORD_SIZE; if (d > SP_HALF_MAX) { r += SP_WORD_SIZE; - while ((d & (1UL << (SP_WORD_SIZE - 1))) == 0) { + while ((d & ((sp_digit)1 << (SP_WORD_SIZE - 1))) == 0) { r--; d <<= 1; }