classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] [patch] native/fdlim unitialized fixes


From: Andreas Tobler
Subject: [cp-patches] [patch] native/fdlim unitialized fixes
Date: Sat, 05 Mar 2005 14:12:12 +0100
User-agent: Mozilla Thunderbird 1.0 (Macintosh/20041206)

Hello,

on request of Michael I put the diff together I applied to libgcj.
Here against classpath cvs. I built it but I could not test classpath so far. I tested it on libgcj.

Andreas

P.S, if accepted could someone please commit ?

2005-03-05  Andreas Tobler  <address@hidden>

        * java/lang/dtoa.c (_dtoa_r): Initialize variables ilim, ilim1 and
        spec_case. Initialize pointer mlo.

* java/lang/strtod.c (_strtod_r): Initialize pointers bb, bd, ds and
        delta.

        * java/lang/e_asin.c (__ieee754_asin): Initialize variable t.

        * java/lang/e_exp.c (__ieee754_exp): Initialize variables hi, lo
        and k.

        * java/lang/e_rem_pio2.c (__ieee754_rem_pio2): Initialize
        uninitialized variable z.
Index: native/fdlibm/dtoa.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/fdlibm/dtoa.c,v
retrieving revision 1.3
diff -u -r1.3 dtoa.c
--- native/fdlibm/dtoa.c        29 Mar 2004 07:07:26 -0000      1.3
+++ native/fdlibm/dtoa.c        5 Mar 2005 13:09:12 -0000
@@ -245,15 +245,16 @@
                to hold the suppressed trailing zeros.
        */
 
-  int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, j, j1, k, k0,
-    k_check, leftright, m2, m5, s2, s5, spec_case, try_quick;
+  int bbits, b2, b5, be, dig, i, ieps, ilim0, j, j1, k, k0,
+    k_check, leftright, m2, m5, s2, s5, try_quick;
+  int ilim = 0, ilim1 = 0, spec_case = 0;
   union double_union d, d2, eps;
   long L;
 #ifndef Sudden_Underflow
   int denorm;
   unsigned long x;
 #endif
-  _Jv_Bigint *b, *b1, *delta, *mlo, *mhi, *S;
+  _Jv_Bigint *b, *b1, *delta, *mlo = NULL, *mhi, *S;
   double ds;
   char *s, *s0;
 
Index: native/fdlibm/strtod.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/fdlibm/strtod.c,v
retrieving revision 1.3
diff -u -r1.3 strtod.c
--- native/fdlibm/strtod.c      29 Mar 2004 07:07:26 -0000      1.3
+++ native/fdlibm/strtod.c      5 Mar 2005 13:09:12 -0000
@@ -118,7 +118,7 @@
   unsigned long y, z;
   union double_union rv, rv0;
 
-  _Jv_Bigint *bb, *bb1, *bd, *bd0, *bs, *delta;
+  _Jv_Bigint *bb = NULL, *bb1, *bd = NULL, *bd0, *bs = NULL, *delta = NULL;
   sign = nz0 = nz = 0;
   rv.d = 0.;
   for (s = s00;; s++)
Index: native/fdlibm/e_asin.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/fdlibm/e_asin.c,v
retrieving revision 1.3
diff -u -r1.3 e_asin.c
--- native/fdlibm/e_asin.c      29 Mar 2004 07:07:26 -0000      1.3
+++ native/fdlibm/e_asin.c      5 Mar 2005 13:09:12 -0000
@@ -75,7 +75,7 @@
        double x;
 #endif
 {
-       double t,w,p,q,c,r,s;
+       double t = 0., w, p, q, c, r, s;
        int32_t hx,ix;
        GET_HIGH_WORD(hx,x);
        ix = hx&0x7fffffff;
Index: native/fdlibm/e_exp.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/fdlibm/e_exp.c,v
retrieving revision 1.3
diff -u -r1.3 e_exp.c
--- native/fdlibm/e_exp.c       29 Mar 2004 07:07:26 -0000      1.3
+++ native/fdlibm/e_exp.c       5 Mar 2005 13:09:13 -0000
@@ -108,8 +108,8 @@
        double x;
 #endif
 {
-       double y,hi,lo,c,t;
-       int32_t k,xsb;
+       double y,hi = 0., lo = 0.,c,t;
+       int32_t k = 0, xsb;
        uint32_t hx;
 
        GET_HIGH_WORD(hx,x);
Index: native/fdlibm/e_rem_pio2.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/fdlibm/e_rem_pio2.c,v
retrieving revision 1.3
diff -u -r1.3 e_rem_pio2.c
--- native/fdlibm/e_rem_pio2.c  29 Mar 2004 07:07:26 -0000      1.3
+++ native/fdlibm/e_rem_pio2.c  5 Mar 2005 13:09:13 -0000
@@ -89,7 +89,7 @@
        double x,y[];
 #endif
 {
-       double z,w,t,r,fn;
+       double z = 0., w, t, r, fn;
        double tx[3];
        int32_t i,j,n,ix,hx;
        int e0,nx;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]