Blame SOURCES/glibc-rh1505492-unused-2.patch

25845f
commit e4f223248ebf4bfaf5e300af96aacd0ddc6c30ed
25845f
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
25845f
Date:   Tue Feb 19 21:20:44 2013 +0530
25845f
25845f
    Fix some testsuite build warning fixes in libm
25845f
25845f
diff --git a/math/atest-exp.c b/math/atest-exp.c
25845f
index f7342f1f36647451..d384c4920acb044f 100644
25845f
--- a/math/atest-exp.c
25845f
+++ b/math/atest-exp.c
25845f
@@ -61,7 +61,7 @@ exp_mpn (mp1 ex, mp1 x)
25845f
    unsigned n;
25845f
    mp1 xp;
25845f
    mp2 tmp;
25845f
-   mp_limb_t chk, round;
25845f
+   mp_limb_t chk;
25845f
    mp1 tol;
25845f
 
25845f
    memset (xp, 0, sizeof (mp1));
25845f
@@ -79,7 +79,7 @@ exp_mpn (mp1 ex, mp1 x)
25845f
        mpn_mul_n (tmp, xp, x, SZ);
25845f
        assert (tmp[SZ * 2 - 1] == 0);
25845f
        if (n > 0)
25845f
-	 round = mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n);
25845f
+	 mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n);
25845f
        chk = mpn_add_n (ex, ex, xp, SZ);
25845f
        assert (chk == 0);
25845f
        n++;
25845f
diff --git a/math/atest-exp2.c b/math/atest-exp2.c
25845f
index 4888490f568ccd96..1a2be9ba021bb24a 100644
25845f
--- a/math/atest-exp2.c
25845f
+++ b/math/atest-exp2.c
25845f
@@ -102,7 +102,7 @@ exp_mpn (mp1 ex, mp1 x)
25845f
    unsigned int n;
25845f
    mp1 xp;
25845f
    mp2 tmp;
25845f
-   mp_limb_t chk, round;
25845f
+   mp_limb_t chk;
25845f
    mp1 tol;
25845f
 
25845f
    memset (xp, 0, sizeof (mp1));
25845f
@@ -120,7 +120,7 @@ exp_mpn (mp1 ex, mp1 x)
25845f
        mpn_mul_n (tmp, xp, x, SZ);
25845f
        assert(tmp[SZ * 2 - 1] == 0);
25845f
        if (n > 0)
25845f
-	 round = mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n);
25845f
+	 mpn_divmod_1 (xp, tmp + FRAC / mpbpl, SZ, n);
25845f
        chk = mpn_add_n (ex, ex, xp, SZ);
25845f
        assert (chk == 0);
25845f
        ++n;
25845f
diff --git a/math/atest-sincos.c b/math/atest-sincos.c
25845f
index d4d35e3c95ab5e29..f4e060b427d30678 100644
25845f
--- a/math/atest-sincos.c
25845f
+++ b/math/atest-sincos.c
25845f
@@ -64,7 +64,6 @@ sincosx_mpn (mp1 si, mp1 co, mp1 xx, mp1 ix)
25845f
    int i;
25845f
    mp2 s[4], c[4];
25845f
    mp1 tmp, x;
25845f
-   mp_limb_t chk, round;
25845f
 
25845f
    if (ix == NULL)
25845f
      {
25845f
@@ -79,34 +78,38 @@ sincosx_mpn (mp1 si, mp1 co, mp1 xx, mp1 ix)
25845f
    for (i = 0; i < 1 << N; i++)
25845f
      {
25845f
 #define add_shift_mulh(d,x,s1,s2,sh,n) \
25845f
-       /* d = (n ? -1 : 1) * (s1 + (s2>>sh)) * x / (1>>N); */		      \
25845f
       do { 								      \
25845f
 	 if (s2 != NULL) {						      \
25845f
 	    if (sh > 0) {						      \
25845f
 	       assert (sh < mpbpl);					      \
25845f
 	       mpn_lshift (tmp, s1, SZ, sh);				      \
25845f
-	       chk = (n ? mpn_sub_n : mpn_add_n)(tmp,tmp,s2+FRAC/mpbpl,SZ);   \
25845f
-	    } else							      \
25845f
-	       chk = (n ? mpn_sub_n : mpn_add_n)(tmp,s1,s2+FRAC/mpbpl,SZ);    \
25845f
-	    /* assert(chk == 0); */					      \
25845f
+	       if (n)							      \
25845f
+	         mpn_sub_n (tmp,tmp,s2+FRAC/mpbpl,SZ);			      \
25845f
+	       else							      \
25845f
+	         mpn_add_n (tmp,tmp,s2+FRAC/mpbpl,SZ);			      \
25845f
+	    } else {							      \
25845f
+	       if (n)							      \
25845f
+	         mpn_sub_n (tmp,s1,s2+FRAC/mpbpl,SZ);			      \
25845f
+	       else							      \
25845f
+	         mpn_add_n (tmp,s1,s2+FRAC/mpbpl,SZ);			      \
25845f
+	    }								      \
25845f
 	    mpn_mul_n(d,tmp,x,SZ);					      \
25845f
 	 } else 							      \
25845f
 	    mpn_mul_n(d,s1,x,SZ);					      \
25845f
-	 /* assert(d[SZ*2-1] == 0); */					      \
25845f
 	 assert(N+sh < mpbpl);						      \
25845f
 	 if (N+sh > 0) mpn_rshift(d,d,2*SZ,N+sh);			      \
25845f
       } while(0)
25845f
 #define summ(d,ss,s,n) \
25845f
-      /* d = ss +/- (s[0]+2*s[1]+2*s[2]+s[3])/6; */			      \
25845f
       do { 								      \
25845f
-	 chk = mpn_add_n(tmp,s[1]+FRAC/mpbpl,s[2]+FRAC/mpbpl,SZ);	      \
25845f
+	 mpn_add_n(tmp,s[1]+FRAC/mpbpl,s[2]+FRAC/mpbpl,SZ);		      \
25845f
 	 mpn_lshift(tmp,tmp,SZ,1);					      \
25845f
-	 chk |= mpn_add_n(tmp,tmp,s[0]+FRAC/mpbpl,SZ);			      \
25845f
-	 chk |= mpn_add_n(tmp,tmp,s[3]+FRAC/mpbpl,SZ);			      \
25845f
-	 round = mpn_divmod_1(tmp,tmp,SZ,6);				      \
25845f
-	 /* chk |= mpn_add_1(tmp,tmp,SZ, (round > 3) ); */		      \
25845f
-         chk |= (n ? mpn_sub_n : mpn_add_n)(d,ss,tmp,SZ);		      \
25845f
-	 /* assert(chk == 0); */					      \
25845f
+	 mpn_add_n(tmp,tmp,s[0]+FRAC/mpbpl,SZ);				      \
25845f
+	 mpn_add_n(tmp,tmp,s[3]+FRAC/mpbpl,SZ);				      \
25845f
+	 mpn_divmod_1(tmp,tmp,SZ,6);					      \
25845f
+	 if (n)								      \
25845f
+           mpn_sub_n (d,ss,tmp,SZ);					      \
25845f
+	 else								      \
25845f
+           mpn_add_n (d,ss,tmp,SZ);					      \
25845f
       } while (0)
25845f
 
25845f
       add_shift_mulh (s[0], x, co, NULL, 0, 0); /* s0 = h * c; */