aboutsummaryrefslogtreecommitdiff
path: root/bfd/compress.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-04-08 09:25:08 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-04-08 09:27:27 -0700
commit5150992626e67d2f6d1573737e06126bfb712c30 (patch)
tree0fe0e977acd3a5bab770b56967186710f3357c44 /bfd/compress.c
parent85558555ec343f6e8ec32da409c838954e68132f (diff)
downloadgdb-5150992626e67d2f6d1573737e06126bfb712c30.zip
gdb-5150992626e67d2f6d1573737e06126bfb712c30.tar.gz
gdb-5150992626e67d2f6d1573737e06126bfb712c30.tar.bz2
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.
Diffstat (limited to 'bfd/compress.c')
-rw-r--r--bfd/compress.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/compress.c b/bfd/compress.c
index ba9fc96..17b24e8 100644
--- a/bfd/compress.c
+++ b/bfd/compress.c
@@ -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);