From bea70b250aa9e5b286db622a26191c6d9f580cdb Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Wed, 1 May 2013 17:37:14 +0000 Subject: gold/ * stringpool.cc (Stringpool_template::new_key_offset): Fix uninitialized warning. --- gold/ChangeLog | 5 +++++ gold/stringpool.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index aadefe00c4..a6f3d59854 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2013-05-01 Cary Coutant + + * stringpool.cc (Stringpool_template::new_key_offset): Fix + uninitialized warning. + 2013-04-29 Alexander Ivchenko * output.cc (Output_section::add_merge_input_section): Allow diff --git a/gold/stringpool.cc b/gold/stringpool.cc index 072b00df7a..665fcc8ce5 100644 --- a/gold/stringpool.cc +++ b/gold/stringpool.cc @@ -222,9 +222,10 @@ Stringpool_template::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); -- cgit v1.2.1