Commit a4f9818b714a2fcbecf9bf75d81745c4efa15999

Francois Perrad 2019-05-18T12:36:45

more cast

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tommath_private.h b/tommath_private.h
index 260062f..ea0777e 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -156,7 +156,7 @@ typedef private_mp_word mp_word;
 #define MP_IS_EVEN(a) (((a)->used == 0) || (((a)->dp[0] & 1u) == 0u))
 #define MP_IS_ODD(a)  (((a)->used > 0) && (((a)->dp[0] & 1u) == 1u))
 
-#define MP_SIZEOF_BITS(type)    (CHAR_BIT * sizeof(type))
+#define MP_SIZEOF_BITS(type)    ((size_t)CHAR_BIT * sizeof(type))
 #define MP_MAXFAST              (int)(1uL << (MP_SIZEOF_BITS(mp_word) - (2u * (size_t)MP_DIGIT_BIT)))
 
 /* Minimum number of available digits in mp_int, MP_PREC >= MP_MIN_PREC */