diff options
author | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-09-30 21:15:58 +0000 |
---|---|---|
committer | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-09-30 21:15:58 +0000 |
commit | 0f2ef1430edaa05f23dfe49dc0c6c72a4f25ae50 (patch) | |
tree | 3037fbafdae9708857d967d711e1a05f8d1506ed /libgfortran/generated/unpack_r4.c | |
parent | 68efaae8912f0b3fcb4f14c65cd11d3ff94769f6 (diff) | |
download | gcc-0f2ef1430edaa05f23dfe49dc0c6c72a4f25ae50.tar.gz |
Fix -Wmaybe-uninitialized warnings.
2014-10-01 Janne Blomqvist <jb@gcc.gnu.org>
* intrinsics/pack_generic.c (pack_s_internal): Fix
-Wmaybe-uninitialized warning.
* m4/unpack.m4 (unpack0_'rtype_code`): Likewise.
(unpack1_'rtype_code`): Likewise.
* generated/unpack_*.m4: Regenerated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215742 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/generated/unpack_r4.c')
-rw-r--r-- | libgfortran/generated/unpack_r4.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgfortran/generated/unpack_r4.c b/libgfortran/generated/unpack_r4.c index c9008745f3a..cc56596bf90 100644 --- a/libgfortran/generated/unpack_r4.c +++ b/libgfortran/generated/unpack_r4.c @@ -104,6 +104,8 @@ unpack0_r4 (gfc_array_r4 *ret, const gfc_array_r4 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; @@ -249,6 +251,8 @@ unpack1_r4 (gfc_array_r4 *ret, const gfc_array_r4 *vector, else { dim = GFC_DESCRIPTOR_RANK (ret); + /* Initialize to avoid -Wmaybe-uninitialized complaints. */ + rstride[0] = 1; for (n = 0; n < dim; n++) { count[n] = 0; |