literal with suffix
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
diff --git a/bn_mp_complement.c b/bn_mp_complement.c
index 256ddea..fae3a59 100644
--- a/bn_mp_complement.c
+++ b/bn_mp_complement.c
@@ -17,7 +17,7 @@
int mp_complement(const mp_int *a, mp_int *b)
{
int res = mp_neg(a, b);
- return res == MP_OKAY ? mp_sub_d(b, 1, b) : res;
+ return res == MP_OKAY ? mp_sub_d(b, 1uL, b) : res;
}
#endif
diff --git a/bn_mp_tc_and.c b/bn_mp_tc_and.c
index 800681a..2969116 100644
--- a/bn_mp_tc_and.c
+++ b/bn_mp_tc_and.c
@@ -22,7 +22,7 @@ int mp_tc_and(const mp_int *a, const mp_int *b, mp_int *c)
if (as || bs) {
bits = MAX(mp_count_bits(a), mp_count_bits(b));
- res = mp_init_set_int(&_mx, 1);
+ res = mp_init_set_int(&_mx, 1uL);
if (res != MP_OKAY) {
goto end;
}
diff --git a/bn_mp_tc_div_2d.c b/bn_mp_tc_div_2d.c
index f341c9b..88aa2f8 100644
--- a/bn_mp_tc_div_2d.c
+++ b/bn_mp_tc_div_2d.c
@@ -21,13 +21,13 @@ int mp_tc_div_2d(const mp_int *a, int b, mp_int *c)
return mp_div_2d(a, b, c, NULL);
}
- res = mp_add_d(a, 1, c);
+ res = mp_add_d(a, 1uL, c);
if (res != MP_OKAY) {
return res;
}
res = mp_div_2d(c, b, c, NULL);
- return res == MP_OKAY ? mp_sub_d(c, 1, c) : res;
+ return res == MP_OKAY ? mp_sub_d(c, 1uL, c) : res;
}
#endif
diff --git a/bn_mp_tc_or.c b/bn_mp_tc_or.c
index 344c20c..d3f1100 100644
--- a/bn_mp_tc_or.c
+++ b/bn_mp_tc_or.c
@@ -22,7 +22,7 @@ int mp_tc_or(const mp_int *a, const mp_int *b, mp_int *c)
if (as || bs) {
bits = MAX(mp_count_bits(a), mp_count_bits(b));
- res = mp_init_set_int(&_mx, 1);
+ res = mp_init_set_int(&_mx, 1uL);
if (res != MP_OKAY) {
goto end;
}
diff --git a/bn_mp_tc_xor.c b/bn_mp_tc_xor.c
index 09547a5..e1de859 100644
--- a/bn_mp_tc_xor.c
+++ b/bn_mp_tc_xor.c
@@ -22,7 +22,7 @@ int mp_tc_xor(const mp_int *a, const mp_int *b, mp_int *c)
if (as || bs) {
bits = MAX(mp_count_bits(a), mp_count_bits(b));
- res = mp_init_set_int(&_mx, 1);
+ res = mp_init_set_int(&_mx, 1uL);
if (res != MP_OKAY) {
goto end;
}