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/m4/unpack.m4 | |
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/m4/unpack.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 e945446d804..271eae2407d 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; |