summaryrefslogtreecommitdiff
path: root/mpfr-impl.h
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-25 06:20:35 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-25 06:20:35 +0000
commit440570287b1a0a892422c53f6c617221d988066b (patch)
tree7cfcb4771aeae86bbb9f1fb1b5577b180b0d5a5f /mpfr-impl.h
parent6a73cc6a28ad47e4188cd5dfdfea9bb88a7b915c (diff)
downloadmpfr-440570287b1a0a892422c53f6c617221d988066b.tar.gz
Casts to size_t added (safer and could be required in the future).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1577 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'mpfr-impl.h')
-rw-r--r--mpfr-impl.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/mpfr-impl.h b/mpfr-impl.h
index 70e173e8d..b9b96cdb1 100644
--- a/mpfr-impl.h
+++ b/mpfr-impl.h
@@ -118,11 +118,14 @@ typedef union ieee_double_extract Ieee_double_extract;
/* temporary allocate s limbs at xp, and initialize mpfr variable x */
#define MPFR_INIT(xp, x, p, s) \
- (xp = (mp_ptr) TMP_ALLOC((s)*BYTES_PER_MP_LIMB), \
- MPFR_PREC(x) = p, MPFR_MANT(x) = xp, MPFR_SIZE(x) = s, MPFR_EXP(x) = 0)
+ (xp = (mp_ptr) TMP_ALLOC((size_t) (s) * BYTES_PER_MP_LIMB), \
+ MPFR_PREC(x) = (p), \
+ MPFR_MANT(x) = (xp), \
+ MPFR_SIZE(x) = (s), \
+ MPFR_EXP(x) = 0)
/* same when xp is already allocated */
#define MPFR_INIT1(xp, x, p, s) \
- (MPFR_PREC(x) = p, MPFR_MANT(x) = xp, MPFR_SIZE(x) = s)
+ (MPFR_PREC(x) = (p), MPFR_MANT(x) = (xp), MPFR_SIZE(x) = (s))
#ifndef _PROTO
#if defined (__STDC__) || defined (__cplusplus)