[GOLD] warning fixes
authorAlan Modra <amodra@gmail.com>
Mon, 26 Sep 2016 08:34:18 +0000 (18:04 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 26 Sep 2016 08:34:18 +0000 (18:04 +0930)
* aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
compiler warning.
* output.cc (Output_segment::set_section_addresses): Likewise.

gold/ChangeLog
gold/aarch64.cc
gold/output.cc

index 8a9d6d5220c13ab1d2b40140a488269944ba9284..c5aed101c1f04cbbe538d73e9790b143448ec119 100644 (file)
@@ -1,3 +1,9 @@
+2016-09-26  Alan Modra  <amodra@gmail.com>
+
+       * aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
+       compiler warning.
+       * output.cc (Output_segment::set_section_addresses): Likewise.
+
 2016-09-02  Doug Kwan  <dougkwan@google.com>
 
         * arm.cc (Target_arm::Target_arm): Move method definition outside of
index ab7e56316f6f5c17e9845e760fefa89fdbc24282..310331c7f844ea82bb67328a52520fb51f6c943c 100644 (file)
@@ -8126,7 +8126,7 @@ Target_aarch64<size, big_endian>::is_erratum_835769_sequence(
     typename elfcpp::Swap<32,big_endian>::Valtype insn2)
 {
   uint32_t rt;
-  uint32_t rt2;
+  uint32_t rt2 = 0;
   uint32_t rn;
   uint32_t rm;
   uint32_t ra;
index 0a9e58f71d2d3268b207c6634eb0fa397c5a3dcc..8e043d7cedc642b84b9dede0283aaf5b76eb00df 100644 (file)
@@ -4398,7 +4398,7 @@ Output_segment::set_section_addresses(const Target* target,
   this->offset_ = orig_off;
 
   off_t off = 0;
-  uint64_t ret;
+  uint64_t ret = 0;
   for (int i = 0; i < static_cast<int>(ORDER_MAX); ++i)
     {
       if (i == static_cast<int>(ORDER_RELRO_LAST))