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]

Re: gold patch committed: Remove assertion


Jan Kratochvil <jan.kratochvil@redhat.com> writes:

> Hello Ian,
>
> On Mon, 12 Sep 2011 19:35:46 +0200, Ian Lance Taylor wrote:
>> --- object.cc	1 Aug 2011 18:25:21 -0000	1.147
>> +++ object.cc	12 Sep 2011 17:34:11 -0000
>> @@ -1582,8 +1582,6 @@ Sized_relobj_file<size, big_endian>::do_
>>         p != eh_frame_sections.end();
>>         ++p)
>>      {
>> -      gold_assert(external_symbols_offset != 0);
>> -
>>        unsigned int i = *p;
>>        const unsigned char* pshdr;
>>        pshdr = section_headers_data + i * This::shdr_size;
>
> object.cc:1152:23: error: variable âexternal_symbols_offsetâ set but not used [-Werror=unused-but-set-variable]

Argh.  Thanks.  Fixed like so.  Committed to mainline.

Ian


2011-09-13  Ian Lance Taylor  <iant@google.com>

	* object.cc (Sized_relobj_file::do_layout): Remove unused local
	variable external_symbols_offset.


Index: object.cc
===================================================================
RCS file: /cvs/src/src/gold/object.cc,v
retrieving revision 1.148
diff -u -p -r1.148 object.cc
--- object.cc	12 Sep 2011 17:34:26 -0000	1.148
+++ object.cc	13 Sep 2011 16:15:46 -0000
@@ -1149,7 +1149,6 @@ Sized_relobj_file<size, big_endian>::do_
   section_size_type section_names_size;
   const unsigned char* symbols_data = NULL;
   section_size_type symbols_size;
-  section_offset_type external_symbols_offset;
   const unsigned char* symbol_names_data = NULL;
   section_size_type symbol_names_size;
  
@@ -1159,7 +1158,6 @@ Sized_relobj_file<size, big_endian>::do_
       section_names_size = gc_sd->section_names_size;
       symbols_data = gc_sd->symbols_data;
       symbols_size = gc_sd->symbols_size;
-      external_symbols_offset = gc_sd->external_symbols_offset;
       symbol_names_data = gc_sd->symbol_names_data;
       symbol_names_size = gc_sd->symbol_names_size;
     }
@@ -1170,7 +1168,6 @@ Sized_relobj_file<size, big_endian>::do_
       if (sd->symbols != NULL)
         symbols_data = sd->symbols->data();
       symbols_size = sd->symbols_size;
-      external_symbols_offset = sd->external_symbols_offset;
       if (sd->symbol_names != NULL)
         symbol_names_data = sd->symbol_names->data();
       symbol_names_size = sd->symbol_names_size;

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