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

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