This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Fix make check build warnings in libm
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Fri, 15 Feb 2013 17:46:55 +0530
- Subject: [PATCH] Fix make check build warnings in libm
Hi,
The patch below fixes a few build warnings in libm tests:
atest-sincos.c: In function âsincosx_mpnâ:
atest-sincos.c:67:19: warning: variable âroundâ set but not used [-Wunused-but-set-variable]
atest-exp.c: In function âexp_mpnâ:
atest-exp.c:64:19: warning: variable âroundâ set but not used [-Wunused-but-set-variable]
atest-exp2.c: In function âexp_mpnâ:
atest-exp2.c:105:19: warning: variable âroundâ set but not used [-Wunused-but-set-variable]
OK to commit?
Siddhesh
* math/atest-exp.c (exp_mpn): Remove ROUND.
* math/atest-exp2.c (exp_mpn): Likewise.
* math/atest-sincos.c (sincosx_mpn): Likewise.
diff --git a/math/atest-exp.c b/math/atest-exp.c
index 2678e74..d76b912 100644
--- a/math/atest-exp.c
+++ b/math/atest-exp.c
@@ -61,7 +61,7 @@ exp_mpn (mp1 ex, mp1 x)
unsigned n;
mp1 xp;
mp2 tmp;
- mp_limb_t chk, round;
+ mp_limb_t chk;
mp1 tol;
memset (xp, 0, sizeof (mp1));
@@ -79,7 +79,7 @@ exp_mpn (mp1 ex, mp1 x)
mpn_mul_n (tmp, xp, x, SZ);
assert (tmp[SZ * 2 - 1] == 0);
if (n > 0)
- round = mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n);
+ mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n);
chk = mpn_add_n (ex, ex, xp, SZ);
assert (chk == 0);
n++;
diff --git a/math/atest-exp2.c b/math/atest-exp2.c
index b05d43b..20836ca 100644
--- a/math/atest-exp2.c
+++ b/math/atest-exp2.c
@@ -102,7 +102,7 @@ exp_mpn (mp1 ex, mp1 x)
unsigned int n;
mp1 xp;
mp2 tmp;
- mp_limb_t chk, round;
+ mp_limb_t chk;
mp1 tol;
memset (xp, 0, sizeof (mp1));
@@ -120,7 +120,7 @@ exp_mpn (mp1 ex, mp1 x)
mpn_mul_n (tmp, xp, x, SZ);
assert(tmp[SZ * 2 - 1] == 0);
if (n > 0)
- round = mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n);
+ mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n);
chk = mpn_add_n (ex, ex, xp, SZ);
assert (chk == 0);
++n;
diff --git a/math/atest-sincos.c b/math/atest-sincos.c
index bea157c..3b61760 100644
--- a/math/atest-sincos.c
+++ b/math/atest-sincos.c
@@ -64,7 +64,7 @@ sincosx_mpn (mp1 si, mp1 co, mp1 xx, mp1 ix)
int i;
mp2 s[4], c[4];
mp1 tmp, x;
- mp_limb_t chk, round;
+ mp_limb_t chk;
if (ix == NULL)
{
@@ -103,7 +103,7 @@ sincosx_mpn (mp1 si, mp1 co, mp1 xx, mp1 ix)
mpn_lshift(tmp,tmp,SZ,1); \
chk |= mpn_add_n(tmp,tmp,s[0]+FRAC/mpbpl,SZ); \
chk |= mpn_add_n(tmp,tmp,s[3]+FRAC/mpbpl,SZ); \
- round = mpn_divmod_1(tmp,tmp,SZ,6); \
+ mpn_divmod_1(tmp,tmp,SZ,6); \
/* chk |= mpn_add_1(tmp,tmp,SZ, (round > 3) ); */ \
chk |= (n ? mpn_sub_n : mpn_add_n)(d,ss,tmp,SZ); \
/* assert(chk == 0); */ \