Branch: Tag:

2013-11-03

2013-11-03 12:17:59 by Arne Goedeke <el@laramies.com>

Gmp: dont compare signed with unsigned

2036:    if (e < 0)    SIMPLE_ARG_ERROR ("Gmp.mpz->pow", 1, "Negative exponent.");    /* Cut off at 1 MB. */ -  if (INT_TYPE_MUL_OVERFLOW(e, size) || size * e > (0x100000/sizeof(mp_limb_t))) { +  if (INT_TYPE_MUL_OVERFLOW(e, size) || size * e > (INT_TYPE)(0x100000/sizeof(mp_limb_t))) {    if(mpz_cmp_si(THIS, -1)<0 || mpz_cmp_si(THIS, 1)>0)    goto too_large;    }
2049:    SIMPLE_ARG_ERROR ("Gmp.mpz->pow", 1, "Negative exponent.");    i=mpz_get_si(mi);    /* Cut off at 1 MB. */ -  if(mpz_cmp_si(mi, i) || INT_TYPE_MUL_OVERFLOW(size, i) || (size*i>(0x100000/sizeof(mp_limb_t)))) +  if(mpz_cmp_si(mi, i) || INT_TYPE_MUL_OVERFLOW(size, i) || (size*i>(INT_TYPE)(0x100000/sizeof(mp_limb_t))))    {    if(mpz_cmp_si(THIS, -1)<0 || mpz_cmp_si(THIS, 1)>0)    SIMPLE_ARG_ERROR ("Gmp.mpz->pow", 1, "Exponent too large.");