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][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


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