diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-04-08 09:25:08 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-04-08 09:27:27 -0700 |
commit | 5150992626e67d2f6d1573737e06126bfb712c30 (patch) | |
tree | 0fe0e977acd3a5bab770b56967186710f3357c44 /bfd/compress.c | |
parent | 85558555ec343f6e8ec32da409c838954e68132f (diff) | |
download | gdb-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.c | 5 |
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); |