summaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2013-03-21 02:00:15 +0000
committerAlan Modra <amodra@bigpond.net.au>2013-03-21 02:00:15 +0000
commit24af265342c6e025a6e2955c1b57be92a9d81268 (patch)
treeed3912f972f39c247943c5e18af891e511556342 /gold
parentd8132a29bb0b7207eaf77333b1a7dfbceddf45b9 (diff)
downloadbinutils-redhat-24af265342c6e025a6e2955c1b57be92a9d81268.tar.gz
* dwp.cc (Dwp_output_file::add_contribution): Avoid signed/unsigned
comparison warning. * layout.cc (Layout::create_dynamic_symtab): Avoid "may be used uninitialized" warning.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog7
-rw-r--r--gold/dwp.cc2
-rw-r--r--gold/layout.cc4
3 files changed, 9 insertions, 4 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 8c3b1a2887..52c2067e10 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,10 @@
+2013-03-21 Alan Modra <amodra@gmail.com>
+
+ * dwp.cc (Dwp_output_file::add_contribution): Avoid signed/unsigned
+ comparison warning.
+ * layout.cc (Layout::create_dynamic_symtab): Avoid "may be used
+ uninitialized" warning.
+
2013-03-20 Alan Modra <amodra@gmail.com>
* symtab.h (Symbol::clear_version): New function.
diff --git a/gold/dwp.cc b/gold/dwp.cc
index eb9e152fa9..c6453bfdef 100644
--- a/gold/dwp.cc
+++ b/gold/dwp.cc
@@ -1476,7 +1476,7 @@ Dwp_output_file::add_contribution(elfcpp::DW_SECT section_id,
int align)
{
const char* section_name = get_dwarf_section_name(section_id);
- gold_assert(section_id < this->section_id_map_.size());
+ gold_assert(static_cast<size_t>(section_id) < this->section_id_map_.size());
unsigned int shndx = this->section_id_map_[section_id];
// Create the section if necessary.
diff --git a/gold/layout.cc b/gold/layout.cc
index faa8f71618..4c48c3c4bb 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -4158,7 +4158,7 @@ Layout::create_dynamic_symtab(const Input_objects* input_objects,
false,
ORDER_DYNAMIC_LINKER,
false);
-
+ *pdynstr = dynstr;
if (dynstr != NULL)
{
Output_section_data* strdata = new Output_data_strtab(&this->dynpool_);
@@ -4174,8 +4174,6 @@ Layout::create_dynamic_symtab(const Input_objects* input_objects,
odyn->add_section_address(elfcpp::DT_STRTAB, dynstr);
odyn->add_section_size(elfcpp::DT_STRSZ, dynstr);
}
-
- *pdynstr = dynstr;
}
// Create the hash tables.