fix build (hopefully)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/demo/test.c b/demo/test.c
index 94a7ca2..1391ee0 100644
--- a/demo/test.c
+++ b/demo/test.c
@@ -625,7 +625,7 @@ static int test_mp_get_u32(void)
DOR(mp_init_multi(&a, &b, NULL));
for (i = 0; i < 1000; ++i) {
- t = (unsigned long)rand_long() & 0xFFFFFFFFuL;
+ t = (unsigned long)rand_long() & (unsigned long)UINT32_MAX;
mp_set_ul(&a, t);
if (t != mp_get_u32(&a)) {
printf("\nmp_get_u32() bad result!");
@@ -637,8 +637,8 @@ static int test_mp_get_u32(void)
printf("\nmp_get_u32() bad result!");
goto LBL_ERR;
}
- mp_set_ul(&a, 0xFFFFFFFFuL);
- if (mp_get_u32(&a) != 0xFFFFFFFFuL) {
+ mp_set_ul(&a, (unsigned long)UINT32_MAX);
+ if (mp_get_u32(&a) != UINT32_MAX) {
printf("\nmp_get_u32() bad result!");
goto LBL_ERR;
}
diff --git a/demo/timing.c b/demo/timing.c
index 4385a08..76ca01f 100644
--- a/demo/timing.c
+++ b/demo/timing.c
@@ -47,7 +47,7 @@ static unsigned long lfsr = 0xAAAAAAAAuL;
static unsigned int lbit(void)
{
if ((lfsr & 0x80000000uL) != 0uL) {
- lfsr = ((lfsr << 1) ^ 0x8000001BuL) & 0xFFFFFFFFuL;
+ lfsr = ((lfsr << 1) ^ 0x8000001BuL) & (unsigned long)UINT32_MAX;
return 1u;
} else {
lfsr <<= 1;