Work around a GCC uninitialized warning bug

* compress.c (bfd_compress_section_contents): Work around a GCC
	uninitialized warning bug fixed in GCC 4.7.
This commit is contained in:
H.J. Lu 2015-04-08 09:25:08 -07:00
parent 85558555ec
commit 5150992626
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
* compress.c (bfd_compress_section_contents): Work around a GCC
uninitialized warning bug fixed in GCC 4.7.
2015-04-08 H.J. Lu <hongjiu.lu@intel.com>
* archive.c (_bfd_get_elt_at_filepos): Also copy BFD_COMPRESS_GABI

View File

@ -79,7 +79,12 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
bfd_byte *buffer;
bfd_size_type buffer_size;
bfd_boolean decompress;
#if defined(__GNUC__) && GCC_VERSION < 4007
/* Work around a GCC uninitialized warning bug fixed in GCC 4.7. */
int zlib_size = 0;
#else
int zlib_size;
#endif
int orig_compression_header_size;
int compression_header_size
= bfd_get_compression_header_size (abfd, NULL);