summaryrefslogtreecommitdiff
path: root/tests/tset_str.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2005-01-27 10:56:44 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2005-01-27 10:56:44 +0000
commit6e38fda01d42c61db41a5c3b1091316436c70aee (patch)
tree54d04116f8dce35dd99e0e0588eeb79a9150f7bd /tests/tset_str.c
parentb365c7af309a36559062b9ebea82776ebfd3a103 (diff)
downloadmpfr-6e38fda01d42c61db41a5c3b1091316436c70aee.tar.gz
casts to allow compilation with g++
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3221 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tset_str.c')
-rw-r--r--tests/tset_str.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tset_str.c b/tests/tset_str.c
index be520eb07..95ba5dba4 100644
--- a/tests/tset_str.c
+++ b/tests/tset_str.c
@@ -111,7 +111,7 @@ main (int argc, char *argv[])
bd = randlimb () & 8;
- str2 = str = (*__gmp_allocate_func) (nc * sizeof(char));
+ str2 = str = (char*) (*__gmp_allocate_func) (nc * sizeof(char));
if (bd)
{
@@ -211,13 +211,13 @@ main (int argc, char *argv[])
baseprec = prec;
else
baseprec = 1 + (prec - 2 + logbase) / logbase;
- str = mpfr_get_str (NULL, &e, base, baseprec, x, k);
- mpfr_set_str (y, str, base, k);
+ str = mpfr_get_str (NULL, &e, base, baseprec, x, (mp_rnd_t) k);
+ mpfr_set_str (y, str, base, (mp_rnd_t) k);
MPFR_EXP(y) += logbase * (e - strlen (str));
if (mpfr_cmp (x, y))
{
printf ("mpfr_set_str o mpfr_get_str <> id for rnd_mode=%s\n",
- mpfr_print_rnd_mode (k));
+ mpfr_print_rnd_mode ((mp_rnd_t) k));
printf ("x=");
mpfr_print_binary (x);
puts ("");
@@ -743,7 +743,7 @@ main (int argc, char *argv[])
mpfr_set_prec (x, mp_bits_per_limb); /* x and y have only one limb */
mpfr_set_prec (y, mp_bits_per_limb);
- str = (*__gmp_allocate_func) (N + 20);
+ str = (char*) (*__gmp_allocate_func) (N + 20);
mpfr_set_ui (x, 1, GMP_RNDN); /* ensures that x is not NaN or Inf */
for (; nb_digit < N; nb_digit *= 10)