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: elf32-bfin.c: compile time warning


Nick Clifton wrote:

It can be fixed by the attached patch. Any objections to my applying it ?

I'd prefer to match the code in the FRV port, which adds a few casts to long. I've committed the following, which I hope also fixes the problem. Thanks for pointing it out...



Bernd
Index: ChangeLog
===================================================================
RCS file: /cvs/src/src/bfd/ChangeLog,v
retrieving revision 1.3464
diff -c -p -r1.3464 ChangeLog
*** ChangeLog	5 Apr 2006 21:12:06 -0000	1.3464
--- ChangeLog	6 Apr 2006 11:35:37 -0000
***************
*** 1,3 ****
--- 1,8 ----
+ 2006-04-05  Bernd Schmidt  <bernd.schmidt@analog.com>
+ 
+ 	* elf32-bfin.c (bfinfdpic_relocs_info_hash): Sprinkle casts to
+ 	eliminate warnings.
+ 
  2006-04-05  H.J. Lu  <hongjiu.lu@intel.com>
  	    James E Wilson  <wilson@specifixinc.com>
  
Index: elf32-bfin.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-bfin.c,v
retrieving revision 1.7
diff -c -p -r1.7 elf32-bfin.c
*** elf32-bfin.c	26 Mar 2006 00:38:42 -0000	1.7
--- elf32-bfin.c	6 Apr 2006 11:35:39 -0000
*************** bfinfdpic_relocs_info_hash (const void *
*** 1284,1291 ****
    const struct bfinfdpic_relocs_info *entry = entry_;
  
    return (entry->symndx == -1
! 	  ? entry->d.h->root.root.hash
! 	  : entry->symndx + entry->d.abfd->id * 257) + entry->addend;
  }
  
  /* Test whether the key fields of two bfinfdpic_relocs_info entries are
--- 1284,1291 ----
    const struct bfinfdpic_relocs_info *entry = entry_;
  
    return (entry->symndx == -1
! 	  ? (long) entry->d.h->root.root.hash
! 	  : entry->symndx + (long) entry->d.abfd->id * 257) + entry->addend;
  }
  
  /* Test whether the key fields of two bfinfdpic_relocs_info entries are

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