aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorPavel I. Kryukov <kryukov@frtk.ru>2017-11-23 15:53:04 +0000
committerNick Clifton <nickc@redhat.com>2017-11-23 15:53:04 +0000
commiteb02c04dc3600e18bb06dc1ef8fc3cf9a967d550 (patch)
tree83aae83fd2ae94eab60c8137a61aaa21114e2b42 /binutils
parent7c3c1aa885b720e25b25af6ac05f34f9ff0e3dfa (diff)
downloadgdb-eb02c04dc3600e18bb06dc1ef8fc3cf9a967d550.zip
gdb-eb02c04dc3600e18bb06dc1ef8fc3cf9a967d550.tar.gz
gdb-eb02c04dc3600e18bb06dc1ef8fc3cf9a967d550.tar.bz2
Avoid bogus compile time warning from clang by initialising local data structure using memset.
PR 22485 * readelf.c (process_archive): Use memset to initiaise thin_filedata structure.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/readelf.c4
2 files changed, 9 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 53d8507..32df4b9 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2017-11-23 Pavel I. Kryukov <kryukov@frtk.ru>
+
+ PR 22485
+ * readelf.c (process_archive): Use memset to initiaise
+ thin_filedata structure.
+
2017-11-21 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/22451
diff --git a/binutils/readelf.c b/binutils/readelf.c
index ea7cc3e..5944ebe 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -18845,7 +18845,9 @@ process_archive (Filedata * filedata, bfd_boolean is_thin_archive)
}
else if (is_thin_archive)
{
- Filedata thin_filedata = { 0 };
+ Filedata thin_filedata;
+
+ memset (&thin_filedata, 0, sizeof (thin_filedata));
/* PR 15140: Allow for corrupt thin archives. */
if (nested_arch.file == NULL)