This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] [GOLD] warning fixes
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 26 Sep 2016 08:54:45 -0000
- Subject: [binutils-gdb] [GOLD] warning fixes
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2422813015a1601d0484afef73a94753ffc07a1d
commit 2422813015a1601d0484afef73a94753ffc07a1d
Author: Alan Modra <amodra@gmail.com>
Date: Mon Sep 26 18:04:18 2016 +0930
[GOLD] warning fixes
* aarch64.cc (Target_aarch64::is_erratum_835769_sequence): Avoid
compiler warning.
* output.cc (Output_segment::set_section_addresses): Likewise.
Diff:
---
gold/ChangeLog | 6 ++++++
gold/aarch64.cc | 2 +-
gold/output.cc | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 8a9d6d5..c5aed10 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -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
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))