diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2014-10-01 00:15:58 +0300 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2014-10-01 00:15:58 +0300 |
commit | b95216f77888e79a9b3563be97fbfdc7c67fd9cb (patch) | |
tree | 3037fbafdae9708857d967d711e1a05f8d1506ed /libgfortran/m4 | |
parent | 6c023041071e6e67362469e9ba603577d6954b17 (diff) | |
download | gcc-b95216f77888e79a9b3563be97fbfdc7c67fd9cb.zip gcc-b95216f77888e79a9b3563be97fbfdc7c67fd9cb.tar.gz gcc-b95216f77888e79a9b3563be97fbfdc7c67fd9cb.tar.bz2 |
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.
From-SVN: r215742
Diffstat (limited to 'libgfortran/m4')
-rw-r--r-- | libgfortran/m4/unpack.m4 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libgfortran/m4/unpack.m4 b/libgfortran/m4/unpack.m4 index e945446..271eae2 100644 --- a/libgfortran/m4/unpack.m4 +++ b/libgfortran/m4/unpack.m4 @@ -105,6 +105,8 @@ unpack0_'rtype_code` ('rtype` *ret, const 'rtype` *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; @@ -250,6 +252,8 @@ unpack1_'rtype_code` ('rtype` *ret, const 'rtype` *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; |