summaryrefslogtreecommitdiff
path: root/gold/stringpool.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2013-05-01 17:37:14 +0000
committerCary Coutant <ccoutant@google.com>2013-05-01 17:37:14 +0000
commit6ad3dabab5613c44aa20aa8698710351ea554721 (patch)
treeacdf5a8bc548f52f956d9021d95ec49d46d2ec53 /gold/stringpool.cc
parentdf26367c793cd2b4c78e111c2d9f9c8c8733b7e9 (diff)
downloadbinutils-gdb-6ad3dabab5613c44aa20aa8698710351ea554721.tar.gz
gold/
* stringpool.cc (Stringpool_template::new_key_offset): Fix uninitialized warning.
Diffstat (limited to 'gold/stringpool.cc')
-rw-r--r--gold/stringpool.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gold/stringpool.cc b/gold/stringpool.cc
index 072b00df7a3..665fcc8ce59 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);