diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-11-21 16:26:19 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-11-21 16:26:19 +0000 |
commit | 83c4428fadeab214993b680317a727cb1e2a50a1 (patch) | |
tree | 879c0082a45679d0e54946f5449d7762b58b38c3 /eq.c | |
parent | 41d7b44241b63a451c3e664bdd9a640a4c255291 (diff) | |
download | mpfr-83c4428fadeab214993b680317a727cb1e2a50a1.tar.gz |
Remove some warnings and potential errors (Comparaison between signed and unsigned).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2563 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'eq.c')
-rw-r--r-- | eq.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -67,7 +67,7 @@ mpfr_eq (mpfr_srcptr u, mpfr_srcptr v, unsigned long int n_bits) if (usize > vsize) { - if (vsize * BITS_PER_MP_LIMB < n_bits) + if ((unsigned long) vsize * BITS_PER_MP_LIMB < n_bits) { k = usize - vsize - 1; while (k >= 0 && !up[k]) --k; @@ -78,7 +78,7 @@ mpfr_eq (mpfr_srcptr u, mpfr_srcptr v, unsigned long int n_bits) } else if (vsize > usize) { - if (usize * BITS_PER_MP_LIMB < n_bits) + if ((unsigned long) usize * BITS_PER_MP_LIMB < n_bits) { k = vsize - usize - 1; while (k >= 0 && !vp[k]) --k; @@ -94,8 +94,8 @@ mpfr_eq (mpfr_srcptr u, mpfr_srcptr v, unsigned long int n_bits) /* now size = min (usize, vsize) */ - if (size > (n_bits + BITS_PER_MP_LIMB - 1) / BITS_PER_MP_LIMB) - size = (n_bits + BITS_PER_MP_LIMB - 1) / BITS_PER_MP_LIMB; + if ((unsigned long)size > (n_bits + BITS_PER_MP_LIMB-1) / BITS_PER_MP_LIMB) + size = (n_bits + BITS_PER_MP_LIMB-1) / BITS_PER_MP_LIMB; up += usize - size; vp += vsize - size; |