From 2fdedf0462d881d8cd9aad3dbf8f93befd26c9fe Mon Sep 17 00:00:00 2001 From: Andreas Tobler Date: Sat, 5 Mar 2005 08:47:58 +0100 Subject: dtoa.c (_dtoa_r): Initialize variables ilim, ilim1 and spec_case. 2005-03-05 Andreas Tobler * 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. * gnu/java/net/natPlainDatagramSocketImplPosix.cc (mcastGrp): Ifdef possible unused variables. * gnu/java/nio/natPipeImplPosix.cc (init): Remove self. * jawt.c: Include to fix implict declaration of malloc. From-SVN: r95925 --- libjava/java/lang/dtoa.c | 7 ++++--- libjava/java/lang/e_asin.c | 2 +- libjava/java/lang/e_exp.c | 4 ++-- libjava/java/lang/e_rem_pio2.c | 2 +- libjava/java/lang/strtod.c | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) (limited to 'libjava/java/lang') diff --git a/libjava/java/lang/dtoa.c b/libjava/java/lang/dtoa.c index 9a398b4..6d5ad3b 100644 --- a/libjava/java/lang/dtoa.c +++ b/libjava/java/lang/dtoa.c @@ -245,15 +245,16 @@ _DEFUN (_dtoa_r, 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; diff --git a/libjava/java/lang/e_asin.c b/libjava/java/lang/e_asin.c index 6b131e6..90fc77ff 100644 --- a/libjava/java/lang/e_asin.c +++ b/libjava/java/lang/e_asin.c @@ -75,7 +75,7 @@ qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */ 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; diff --git a/libjava/java/lang/e_exp.c b/libjava/java/lang/e_exp.c index e11ca8b..ad37f86 100644 --- a/libjava/java/lang/e_exp.c +++ b/libjava/java/lang/e_exp.c @@ -108,8 +108,8 @@ P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */ 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); diff --git a/libjava/java/lang/e_rem_pio2.c b/libjava/java/lang/e_rem_pio2.c index 6d3fd19..543234c 100644 --- a/libjava/java/lang/e_rem_pio2.c +++ b/libjava/java/lang/e_rem_pio2.c @@ -89,7 +89,7 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */ 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; diff --git a/libjava/java/lang/strtod.c b/libjava/java/lang/strtod.c index 1777b1a..b3e0912 100644 --- a/libjava/java/lang/strtod.c +++ b/libjava/java/lang/strtod.c @@ -118,7 +118,7 @@ _DEFUN (_strtod_r, (ptr, s00, se), 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++) -- cgit v1.1