This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[GOLD] warning fixes


	* aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
	compiler warning.
	* output.cc (Output_segment::set_section_addresses): Likewise.

diff --git a/gold/aarch64.cc b/gold/aarch64.cc
index ab7e563..310331c 100644
--- a/gold/aarch64.cc
+++ b/gold/aarch64.cc
@@ -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;
diff --git a/gold/output.cc b/gold/output.cc
index 0a9e58f..8e043d7 100644
--- a/gold/output.cc
+++ b/gold/output.cc
@@ -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))

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]