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 /exp3.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 'exp3.c')
-rw-r--r-- | exp3.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -19,6 +19,7 @@ along with the MPFR Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#include <stddef.h> #include <limits.h> #include "gmp.h" #include "gmp-impl.h" @@ -40,7 +41,7 @@ mpfr_exp_rational (mpfr_ptr y, mpz_srcptr p, int r, int m) TMP_DECL (marker); TMP_MARK (marker); - MPFR_ASSERTN(m < sizeof(int) * CHAR_BIT - 1); + MPFR_ASSERTN((size_t) m < sizeof(int) * CHAR_BIT - 1); n = 1 << m; P = (mpz_t*) TMP_ALLOC((m+1) * sizeof(mpz_t)); S = (mpz_t*) TMP_ALLOC((m+1) * sizeof(mpz_t)); @@ -62,7 +63,7 @@ mpfr_exp_rational (mpfr_ptr y, mpz_srcptr p, int r, int m) mpz_set_ui(P[k], i+1); mpz_set(S[k], P[k]);; j=i+1; l=0; while ((j & 1) == 0) { - MPFR_ASSERTN(l < sizeof(int) * CHAR_BIT - 1); + MPFR_ASSERTN((size_t) l < sizeof(int) * CHAR_BIT - 1); mpz_mul(S[k], S[k], ptoj[l]); mpz_mul(S[k-1], S[k-1], P[k]); mpz_mul_2exp(S[k-1], S[k-1], r*(1<<l)); |