diff options
author | Andreas Jaeger <aj@suse.de> | 2005-05-15 17:50:09 +0200 |
---|---|---|
committer | Andreas Jaeger <aj@gcc.gnu.org> | 2005-05-15 17:50:09 +0200 |
commit | 7672ae20826b2b3921d93be1a6bd5e932c52cd25 (patch) | |
tree | e8ece30142cb7a852906438b278750add7b9192c /libgfortran/intrinsics | |
parent | 7d3cdba14278292b420b290a492964b2cadb0048 (diff) | |
download | gcc-7672ae20826b2b3921d93be1a6bd5e932c52cd25.zip gcc-7672ae20826b2b3921d93be1a6bd5e932c52cd25.tar.gz gcc-7672ae20826b2b3921d93be1a6bd5e932c52cd25.tar.bz2 |
eoshift1.m4: Initialize variables to avoid warnings.
* m4/eoshift1.m4: Initialize variables to avoid warnings.
* m4/eoshift3.m4: Initialize variables to avoid warnings.
* generated/eoshift1_4.c, generated/eoshift1_8.c,
generated/eoshift3_4.c, generated/eoshift3_8.c: Regenerated.
* intrinsics/spread_generic.c (spread): Initialize variables to
avoid warnings.
* intrinsics/eoshift0.c (eoshift0): Initialize variables to avoid
warnings.
* intrinsics/eoshift2.c (eoshift2): Initialize variables to avoid
warnings.
* io/list_read.c (nml_get_obj_data): Initialize variables to avoid
warnings.
From-SVN: r99726
Diffstat (limited to 'libgfortran/intrinsics')
-rw-r--r-- | libgfortran/intrinsics/eoshift0.c | 9 | ||||
-rw-r--r-- | libgfortran/intrinsics/eoshift2.c | 9 | ||||
-rw-r--r-- | libgfortran/intrinsics/spread_generic.c | 4 |
3 files changed, 16 insertions, 6 deletions
diff --git a/libgfortran/intrinsics/eoshift0.c b/libgfortran/intrinsics/eoshift0.c index 5db3737..b1fbd1a 100644 --- a/libgfortran/intrinsics/eoshift0.c +++ b/libgfortran/intrinsics/eoshift0.c @@ -1,5 +1,5 @@ /* Generic implementation of the EOSHIFT intrinsic - Copyright 2002 Free Software Foundation, Inc. + Copyright 2002, 2005 Free Software Foundation, Inc. Contributed by Paul Brook <paul@nowt.org> This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -64,6 +64,12 @@ eoshift0 (gfc_array_char * ret, const gfc_array_char * array, index_type len; index_type n; + /* The compiler cannot figure out that these are set, initialize + them to avoid warnings. */ + len = 0; + soffset = 0; + roffset = 0; + if (!pbound) pbound = zeros; @@ -251,4 +257,3 @@ eoshift0_8 (gfc_array_char *ret, const gfc_array_char *array, { eoshift0 (ret, array, *pshift, pbound, pdim ? *pdim : 1); } - diff --git a/libgfortran/intrinsics/eoshift2.c b/libgfortran/intrinsics/eoshift2.c index 8d22dbe..70baf3c 100644 --- a/libgfortran/intrinsics/eoshift2.c +++ b/libgfortran/intrinsics/eoshift2.c @@ -1,5 +1,5 @@ /* Generic implementation of the EOSHIFT intrinsic - Copyright 2002 Free Software Foundation, Inc. + Copyright 2002, 2005 Free Software Foundation, Inc. Contributed by Paul Brook <paul@nowt.org> This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -68,6 +68,12 @@ eoshift2 (gfc_array_char *ret, const gfc_array_char *array, index_type len; index_type n; + /* The compiler cannot figure out that these are set, initialize + them to avoid warnings. */ + len = 0; + soffset = 0; + roffset = 0; + size = GFC_DESCRIPTOR_SIZE (ret); if (ret->data == NULL) @@ -267,4 +273,3 @@ eoshift2_8 (gfc_array_char *ret, const gfc_array_char *array, { eoshift2 (ret, array, *pshift, bound, pdim ? *pdim : 1); } - diff --git a/libgfortran/intrinsics/spread_generic.c b/libgfortran/intrinsics/spread_generic.c index 8d39d30..0115287 100644 --- a/libgfortran/intrinsics/spread_generic.c +++ b/libgfortran/intrinsics/spread_generic.c @@ -1,5 +1,5 @@ /* Generic implementation of the SPREAD intrinsic - Copyright 2002 Free Software Foundation, Inc. + Copyright 2002, 2005 Free Software Foundation, Inc. Contributed by Paul Brook <paul@nowt.org> This file is part of the GNU Fortran 95 runtime library (libgfortran). @@ -45,7 +45,7 @@ spread (gfc_array_char *ret, const gfc_array_char *source, /* r.* indicates the return array. */ index_type rstride[GFC_MAX_DIMENSIONS]; index_type rstride0; - index_type rdelta; + index_type rdelta = 0; index_type rrank; index_type rs; char *rptr; |