summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTorbjorn Granlund <tege@gmplib.org>2013-02-28 11:51:54 +0100
committerTorbjorn Granlund <tege@gmplib.org>2013-02-28 11:51:54 +0100
commitb91b82e43a49bc17bc29b6d20ab2ac791ac03c4b (patch)
tree848116f4e6a02f6ce33132ede5914998c30eac39 /tests
parent0bb491d0b183706209f784df3e1ac03ac2a84187 (diff)
downloadgmp-b91b82e43a49bc17bc29b6d20ab2ac791ac03c4b.tar.gz
Remove unused variables and functions.
Diffstat (limited to 'tests')
-rw-r--r--tests/mpn/t-brootinv.c1
-rw-r--r--tests/mpn/t-hgcd_appr.c13
-rw-r--r--tests/mpq/t-get_d.c1
-rw-r--r--tests/mpz/t-bin.c4
-rw-r--r--tests/mpz/t-jac.c2
-rw-r--r--tests/mpz/t-limbs.c4
-rw-r--r--tests/mpz/t-mfac_uiui.c4
7 files changed, 5 insertions, 24 deletions
diff --git a/tests/mpn/t-brootinv.c b/tests/mpn/t-brootinv.c
index 78b25151e..32a354eba 100644
--- a/tests/mpn/t-brootinv.c
+++ b/tests/mpn/t-brootinv.c
@@ -63,7 +63,6 @@ main (int argc, char **argv)
{
mp_size_t n;
mp_limb_t k;
- int c;
n = 1 + gmp_urandomm_ui (rands, MAX_LIMBS);
diff --git a/tests/mpn/t-hgcd_appr.c b/tests/mpn/t-hgcd_appr.c
index 186dfabe2..31266147d 100644
--- a/tests/mpn/t-hgcd_appr.c
+++ b/tests/mpn/t-hgcd_appr.c
@@ -157,9 +157,6 @@ debug_mp (mpz_t x, int base)
mpz_out_str (stderr, base, x); fputc ('\n', stderr);
}
-static int
-mpz_mpn_equal (const mpz_t a, mp_srcptr bp, mp_size_t bsize);
-
static mp_size_t
one_test (mpz_t a, mpz_t b, int i)
{
@@ -384,16 +381,6 @@ hgcd_ref (struct hgcd_ref *hgcd, mpz_t a, mpz_t b)
}
static int
-mpz_mpn_equal (const mpz_t a, mp_srcptr bp, mp_size_t bsize)
-{
- mp_srcptr ap = a->_mp_d;
- mp_size_t asize = a->_mp_size;
-
- MPN_NORMALIZE (bp, bsize);
- return asize == bsize && mpn_cmp (ap, bp, asize) == 0;
-}
-
-static int
hgcd_ref_equal (const struct hgcd_ref *A, const struct hgcd_ref *B)
{
unsigned i;
diff --git a/tests/mpq/t-get_d.c b/tests/mpq/t-get_d.c
index a22b07861..80ea94af8 100644
--- a/tests/mpq/t-get_d.c
+++ b/tests/mpq/t-get_d.c
@@ -171,7 +171,6 @@ check_random (int argc, char **argv)
int exp;
int test, reps = 100000;
- int i;
if (argc == 2)
reps = 100 * atoi (argv[1]);
diff --git a/tests/mpz/t-bin.c b/tests/mpz/t-bin.c
index af6b4df3c..cd700d9d3 100644
--- a/tests/mpz/t-bin.c
+++ b/tests/mpz/t-bin.c
@@ -212,9 +212,7 @@ void
smallexaustive (unsigned int count)
{
mpz_t n_z, want;
- unsigned long n, k, i, r;
- int tests;
- gmp_randstate_ptr rands;
+ unsigned long n, k;
mpz_init (n_z);
mpz_init (want);
diff --git a/tests/mpz/t-jac.c b/tests/mpz/t-jac.c
index 7274392ad..2ccb7cc9f 100644
--- a/tests/mpz/t-jac.c
+++ b/tests/mpz/t-jac.c
@@ -912,8 +912,6 @@ check_large_quotients (void)
for (i = 0; i < COUNT; i++)
{
- unsigned j;
- unsigned chain_len;
int answer;
mp_bitcnt_t msize;
diff --git a/tests/mpz/t-limbs.c b/tests/mpz/t-limbs.c
index 9f3fe6551..23eed472f 100644
--- a/tests/mpz/t-limbs.c
+++ b/tests/mpz/t-limbs.c
@@ -64,6 +64,7 @@ check_funcs (const char *name,
if (mpz_cmp (r, ref) != 0)
{
printf ("%s failed, abits %u, bbits %u\n",
+ name,
(unsigned) mpz_sizeinbase (a, 2),
(unsigned) mpz_sizeinbase (b, 2));
gmp_printf ("a = %Zx\n", a);
@@ -100,7 +101,6 @@ alt_mul (mpz_ptr r, mpz_srcptr a, mpz_srcptr b)
mp_size_t an = mpz_size (a);
mp_size_t bn = mpz_size (b);
mp_srcptr ap, bp;
- mp_ptr rp;
TMP_DECL;
TMP_MARK;
@@ -143,7 +143,7 @@ void
check_mul (void)
{
gmp_randstate_ptr rands = RANDS;
- mpz_t bs, a, b, r, ref;
+ mpz_t bs, a, b;
unsigned i;
mpz_inits (bs, a, b, NULL);
for (i = 0; i < COUNT; i++)
diff --git a/tests/mpz/t-mfac_uiui.c b/tests/mpz/t-mfac_uiui.c
index 10082b2d5..932065bfb 100644
--- a/tests/mpz/t-mfac_uiui.c
+++ b/tests/mpz/t-mfac_uiui.c
@@ -66,7 +66,7 @@ main (int argc, char *argv[])
MPZ_CHECK_FORMAT (res);
if (mpz_cmp (ref[m], res) != 0)
{
- printf ("mpz_mfac_uiui(%lu,&i) wrong\n", n, MULTIFAC_WHEEL);
+ printf ("mpz_mfac_uiui(%lu,%d) wrong\n", n, MULTIFAC_WHEEL);
printf (" got "); mpz_out_str (stdout, 10, res); printf("\n");
printf (" want "); mpz_out_str (stdout, 10, ref[m]); printf("\n");
abort ();
@@ -75,7 +75,7 @@ main (int argc, char *argv[])
MPZ_CHECK_FORMAT (res);
if (mpz_cmp (ref2[m2], res) != 0)
{
- printf ("mpz_mfac_uiui(%lu,&i) wrong\n", n, MULTIFAC_WHEEL2);
+ printf ("mpz_mfac_uiui(%lu,%d) wrong\n", n, MULTIFAC_WHEEL2);
printf (" got "); mpz_out_str (stdout, 10, res); printf("\n");
printf (" want "); mpz_out_str (stdout, 10, ref2[m2]); printf("\n");
abort ();