]> sourceware.org Git - glibc.git/commitdiff
Fix some testsuite build warning fixes in libm
authorSiddhesh Poyarekar <siddhesh@redhat.com>
Tue, 19 Feb 2013 15:50:44 +0000 (21:20 +0530)
committerSiddhesh Poyarekar <siddhesh@redhat.com>
Tue, 19 Feb 2013 15:50:44 +0000 (21:20 +0530)
ChangeLog
math/atest-exp.c
math/atest-exp2.c
math/atest-sincos.c

index d5f9a83bf6b0a3b94b90eb9ea5c171dac1b58674..b40880a5e47f57c2167f4df02c7ec6027e5bd75d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-02-19  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
+       * math/atest-exp.c (exp_mpn): Remove ROUND.
+       * math/atest-exp2.c (exp_mpn): Likewise.
+       * math/atest-sincos.c (sincosx_mpn): Remove ROUND and CHK.
+
        * stdlib/cxa_thread_atexit_impl.c: Fix Copyright year.
        * stdlib/tst-tls-atexit-lib.c: Likewise.
        * stdlib/tst-tls-atexit.c: Likewise.
index 2678e743cef56e76e59a1256cfacd3434e3dcfb9..d76b9125ca035de58ee689c5b528d14741da8c93 100644 (file)
@@ -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++;
index b05d43b4079c7e037e4282d333c5e58ffe04b4bd..20836ca0dccda55a8c74857192c28500d5c25cd3 100644 (file)
@@ -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;
index bea157c288373fa56442cfeb488096cb35502868..313bccb884b23841000101fcf01d7d558e2e5f2b 100644 (file)
@@ -64,7 +64,6 @@ 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;
 
    if (ix == NULL)
      {
@@ -79,34 +78,38 @@ sincosx_mpn (mp1 si, mp1 co, mp1 xx, mp1 ix)
    for (i = 0; i < 1 << N; i++)
      {
 #define add_shift_mulh(d,x,s1,s2,sh,n) \
-       /* d = (n ? -1 : 1) * (s1 + (s2>>sh)) * x / (1>>N); */                \
       do {                                                                   \
         if (s2 != NULL) {                                                    \
            if (sh > 0) {                                                     \
               assert (sh < mpbpl);                                           \
               mpn_lshift (tmp, s1, SZ, sh);                                  \
-              chk = (n ? mpn_sub_n : mpn_add_n)(tmp,tmp,s2+FRAC/mpbpl,SZ);   \
-           } else                                                            \
-              chk = (n ? mpn_sub_n : mpn_add_n)(tmp,s1,s2+FRAC/mpbpl,SZ);    \
-           /* assert(chk == 0); */                                           \
+              if (n)                                                         \
+                mpn_sub_n (tmp,tmp,s2+FRAC/mpbpl,SZ);                        \
+              else                                                           \
+                mpn_add_n (tmp,tmp,s2+FRAC/mpbpl,SZ);                        \
+           } else {                                                          \
+              if (n)                                                         \
+                mpn_sub_n (tmp,s1,s2+FRAC/mpbpl,SZ);                         \
+              else                                                           \
+                mpn_add_n (tmp,s1,s2+FRAC/mpbpl,SZ);                         \
+           }                                                                 \
            mpn_mul_n(d,tmp,x,SZ);                                            \
         } else                                                               \
            mpn_mul_n(d,s1,x,SZ);                                             \
-        /* assert(d[SZ*2-1] == 0); */                                        \
         assert(N+sh < mpbpl);                                                \
         if (N+sh > 0) mpn_rshift(d,d,2*SZ,N+sh);                             \
       } while(0)
 #define summ(d,ss,s,n) \
-      /* d = ss +/- (s[0]+2*s[1]+2*s[2]+s[3])/6; */                          \
       do {                                                                   \
-        chk = mpn_add_n(tmp,s[1]+FRAC/mpbpl,s[2]+FRAC/mpbpl,SZ);             \
+        mpn_add_n(tmp,s[1]+FRAC/mpbpl,s[2]+FRAC/mpbpl,SZ);                   \
         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);                                  \
-        /* chk |= mpn_add_1(tmp,tmp,SZ, (round > 3) ); */                    \
-         chk |= (n ? mpn_sub_n : mpn_add_n)(d,ss,tmp,SZ);                    \
-        /* assert(chk == 0); */                                              \
+        mpn_add_n(tmp,tmp,s[0]+FRAC/mpbpl,SZ);                               \
+        mpn_add_n(tmp,tmp,s[3]+FRAC/mpbpl,SZ);                               \
+        mpn_divmod_1(tmp,tmp,SZ,6);                                          \
+        if (n)                                                               \
+           mpn_sub_n (d,ss,tmp,SZ);                                          \
+        else                                                                 \
+           mpn_add_n (d,ss,tmp,SZ);                                          \
       } while (0)
 
       add_shift_mulh (s[0], x, co, NULL, 0, 0); /* s0 = h * c; */
This page took 0.113985 seconds and 5 git commands to generate.