Avoid bogus compile time warning from clang by initialising local data structure...
authorPavel I. Kryukov <kryukov@frtk.ru>
Thu, 23 Nov 2017 15:53:04 +0000 (15:53 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 23 Nov 2017 15:53:04 +0000 (15:53 +0000)
PR 22485
* readelf.c (process_archive): Use memset to initiaise
thin_filedata structure.

binutils/ChangeLog
binutils/readelf.c

index 53d85072f0d68d6f781d19c8b6c8760d7113e8c0..32df4b98f7618da42af24c79417827dad265b08e 100644 (file)
@@ -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
index ea7cc3e18eefe110b1fc0b03592346731f8399c8..5944ebee960bd65c520538e48a84696ca98a0c69 100644 (file)
@@ -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)