diff options
author | Cary Coutant <ccoutant@google.com> | 2013-05-01 17:37:14 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2013-05-01 17:37:14 +0000 |
commit | 6ad3dabab5613c44aa20aa8698710351ea554721 (patch) | |
tree | acdf5a8bc548f52f956d9021d95ec49d46d2ec53 /gold | |
parent | df26367c793cd2b4c78e111c2d9f9c8c8733b7e9 (diff) | |
download | gdb-6ad3dabab5613c44aa20aa8698710351ea554721.zip gdb-6ad3dabab5613c44aa20aa8698710351ea554721.tar.gz gdb-6ad3dabab5613c44aa20aa8698710351ea554721.tar.bz2 |
gold/
* stringpool.cc (Stringpool_template::new_key_offset): Fix
uninitialized warning.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 5 | ||||
-rw-r--r-- | gold/stringpool.cc | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index aadefe0..a6f3d59 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2013-05-01 Cary Coutant <ccoutant@google.com> + + * stringpool.cc (Stringpool_template::new_key_offset): Fix + uninitialized warning. + 2013-04-29 Alexander Ivchenko <alexander.ivchenko@intel.com> * output.cc (Output_section::add_merge_input_section): Allow diff --git a/gold/stringpool.cc b/gold/stringpool.cc index 072b00d..665fcc8 100644 --- a/gold/stringpool.cc +++ b/gold/stringpool.cc @@ -222,9 +222,10 @@ Stringpool_template<Stringpool_char>::new_key_offset(size_t length) offset = 0; else { + offset = this->offset_; // Align non-zero length strings. if (length != 0) - offset = align_address(this->offset_, this->addralign_); + offset = align_address(offset, this->addralign_); this->offset_ = offset + (length + 1) * sizeof(Stringpool_char); } this->key_to_offset_.push_back(offset); |