Commit f2efe7467643615db32518f56a32e9358d8e07e0

Francois Perrad 2019-10-22T17:53:27

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 2832690..45aad4e 100644
--- a/tommath_private.h
+++ b/tommath_private.h
@@ -157,7 +157,7 @@ extern void MP_FREE(void *mem, size_t size);
 #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)))
 
-#define MP_WARRAY (1 << ((MP_SIZEOF_BITS(mp_word) - (2 * MP_DIGIT_BIT)) + 1))
+#define MP_WARRAY               (int)(1 << ((MP_SIZEOF_BITS(mp_word) - (2 * (size_t)MP_DIGIT_BIT)) + 1))
 
 #if defined(MP_16BIT)
 typedef uint32_t mp_word;