Fix may be uninitialized warnings in libgfortran
Andreas Jaeger
aj@suse.de
Sun May 15 13:01:00 GMT 2005
I missed one file - I'll commit it once the others are approved, these
are all the same...
Andreas
* intrinsics/eoshift2.c (eoshift2): Initialize variables to avoid
warnings.
============================================================
Index: libgfortran/intrinsics/eoshift2.c
--- intrinsics/eoshift2.c 4 May 2005 21:38:15 -0000 1.10
+++ intrinsics/eoshift2.c 15 May 2005 13:00:55 -0000
@@ -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
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)
--
Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20050515/60cdc50c/attachment.sig>
More information about the Fortran
mailing list