This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[GOLD][COMMITTED] Fix build breakage on a 32-bit host due to signed/unsigned comparison.
- From: =?big5?b?RG91ZyBLd2FuICjD9q62vHcp?= <dougkwan at google dot com>
- To: Ian Lance Taylor <iant at google dot com>, binutils <binutils at sourceware dot org>
- Date: Mon, 25 Jan 2010 09:32:27 -0800
- Subject: [GOLD][COMMITTED] Fix build breakage on a 32-bit host due to signed/unsigned comparison.
Hi,
I just committed this as trival.
-Doug
2010-01-25 Doug Kwan <dougkwan@google.com>
* arm.cc (Arm_exidx_merged_section::do_output_offset):
Fix warning due to signed and unsigned comparison on a 32-bit host.
Index: gold/arm.cc
===================================================================
RCS file: /cvs/src/src/gold/arm.cc,v
retrieving revision 1.64
diff -u -u -p -r1.64 arm.cc
--- gold/arm.cc 23 Jan 2010 01:07:59 -0000 1.64
+++ gold/arm.cc 25 Jan 2010 17:28:09 -0000
@@ -4587,7 +4587,9 @@ Arm_exidx_merged_section::do_output_offs
|| shndx != this->exidx_input_section_.shndx())
return false;
- if (offset < 0 || offset >= this->exidx_input_section_.size())
+ section_offset_type section_size =
+ convert_types<section_offset_type>(this->exidx_input_section_.size());
+ if (offset < 0 || offset >= section_size)
// Input offset is out of valid range.
*poutput = -1;
else