From 5bed36d99701b3e27268ddbcc7206fd069deecb6 Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sun, 11 Oct 2015 10:52:10 +0200 Subject: [PATCH] explicit ignoring the return value of function --- bn_mp_div.c | 2 +- bn_mp_dr_reduce.c | 2 +- bn_mp_exteuclid.c | 6 +++--- bn_mp_reduce_2k.c | 2 +- bn_mp_reduce_2k_l.c | 2 +- bn_mp_toom_mul.c | 4 ++-- bn_mp_toom_sqr.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bn_mp_div.c b/bn_mp_div.c index c33fac8..3dc28c9 100644 --- a/bn_mp_div.c +++ b/bn_mp_div.c @@ -270,7 +270,7 @@ int mp_div (mp_int * a, mp_int * b, mp_int * c, mp_int * d) } if (d != NULL) { - mp_div_2d (&x, norm, &x, NULL); + (void)mp_div_2d (&x, norm, &x, NULL); mp_exch (&x, d); } diff --git a/bn_mp_dr_reduce.c b/bn_mp_dr_reduce.c index 84c3006..62e9612 100644 --- a/bn_mp_dr_reduce.c +++ b/bn_mp_dr_reduce.c @@ -82,7 +82,7 @@ top: * Each successive "recursion" makes the input smaller and smaller. */ if (mp_cmp_mag (x, n) != MP_LT) { - s_mp_sub(x, n, x); + (void)s_mp_sub(x, n, x); goto top; } return MP_OKAY; diff --git a/bn_mp_exteuclid.c b/bn_mp_exteuclid.c index c486e1c..3b0bb4a 100644 --- a/bn_mp_exteuclid.c +++ b/bn_mp_exteuclid.c @@ -61,9 +61,9 @@ int mp_exteuclid(mp_int *a, mp_int *b, mp_int *U1, mp_int *U2, mp_int *U3) /* make sure U3 >= 0 */ if (u3.sign == MP_NEG) { - mp_neg(&u1, &u1); - mp_neg(&u2, &u2); - mp_neg(&u3, &u3); + (void)mp_neg(&u1, &u1); + (void)mp_neg(&u2, &u2); + (void)mp_neg(&u3, &u3); } /* copy result out */ diff --git a/bn_mp_reduce_2k.c b/bn_mp_reduce_2k.c index cfa59c7..f03bc11 100644 --- a/bn_mp_reduce_2k.c +++ b/bn_mp_reduce_2k.c @@ -45,7 +45,7 @@ top: } if (mp_cmp_mag(a, n) != MP_LT) { - s_mp_sub(a, n, a); + (void)s_mp_sub(a, n, a); goto top; } diff --git a/bn_mp_reduce_2k_l.c b/bn_mp_reduce_2k_l.c index 076018c..0ee5402 100644 --- a/bn_mp_reduce_2k_l.c +++ b/bn_mp_reduce_2k_l.c @@ -46,7 +46,7 @@ top: } if (mp_cmp_mag(a, n) != MP_LT) { - s_mp_sub(a, n, a); + (void)s_mp_sub(a, n, a); goto top; } diff --git a/bn_mp_toom_mul.c b/bn_mp_toom_mul.c index f0df3c2..81fec9f 100644 --- a/bn_mp_toom_mul.c +++ b/bn_mp_toom_mul.c @@ -46,7 +46,7 @@ int mp_toom_mul(mp_int *a, mp_int *b, mp_int *c) goto ERR; } mp_rshd(&a1, B); - mp_mod_2d(&a1, DIGIT_BIT * B, &a1); + (void)mp_mod_2d(&a1, DIGIT_BIT * B, &a1); if ((res = mp_copy(a, &a2)) != MP_OKAY) { goto ERR; @@ -62,7 +62,7 @@ int mp_toom_mul(mp_int *a, mp_int *b, mp_int *c) goto ERR; } mp_rshd(&b1, B); - mp_mod_2d(&b1, DIGIT_BIT * B, &b1); + (void)mp_mod_2d(&b1, DIGIT_BIT * B, &b1); if ((res = mp_copy(b, &b2)) != MP_OKAY) { goto ERR; diff --git a/bn_mp_toom_sqr.c b/bn_mp_toom_sqr.c index f8208a6..d2c096c 100644 --- a/bn_mp_toom_sqr.c +++ b/bn_mp_toom_sqr.c @@ -39,7 +39,7 @@ mp_toom_sqr(mp_int *a, mp_int *b) goto ERR; } mp_rshd(&a1, B); - mp_mod_2d(&a1, DIGIT_BIT * B, &a1); + (void)mp_mod_2d(&a1, DIGIT_BIT * B, &a1); if ((res = mp_copy(a, &a2)) != MP_OKAY) { goto ERR;