summaryrefslogtreecommitdiff
path: root/eq.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-11-21 16:26:19 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-11-21 16:26:19 +0000
commit83c4428fadeab214993b680317a727cb1e2a50a1 (patch)
tree879c0082a45679d0e54946f5449d7762b58b38c3 /eq.c
parent41d7b44241b63a451c3e664bdd9a640a4c255291 (diff)
downloadmpfr-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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/eq.c b/eq.c
index d1a17fcc9..0771aa585 100644
--- a/eq.c
+++ b/eq.c
@@ -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;