This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: elf32-bfin.c: compile time warning
- From: Bernd Schmidt <bernds_cb1 at t-online dot de>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sources dot redhat dot com
- Date: Thu, 06 Apr 2006 13:38:25 +0200
- Subject: Re: elf32-bfin.c: compile time warning
- References: <44342164.9000209@t-online.de> <4434E306.2010202@redhat.com>
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