gold/
authorCary Coutant <ccoutant@google.com>
Wed, 1 May 2013 17:37:14 +0000 (17:37 +0000)
committerCary Coutant <ccoutant@google.com>
Wed, 1 May 2013 17:37:14 +0000 (17:37 +0000)
* stringpool.cc (Stringpool_template::new_key_offset): Fix
uninitialized warning.

gold/ChangeLog
gold/stringpool.cc

index aadefe00c413a72ab1073d77465e1afa24dd373b..a6f3d5985418e2cc2d9f7b4f8768a4f09103d01b 100644 (file)
@@ -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
index 072b00df7a393d444835ea0003cd6bfa2f7b7617..665fcc8ce59d7e62dcebd9c36dbdda88b2dfa097 100644 (file)
@@ -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);