This is the mail archive of the binutils@sources.redhat.com 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]

PATCH: Fix coff-sh.c


I got

/home/hjl/work/linux/import/binutils/bfd/coff-sh.c:481: warning: large integer implicitly truncated to unsigned type

The problem is bfd_reloc_val is bfd_reloc_code_real_type which can
be larger than unsigned char. I am checking this as an obvious fix.


H.J.
----
2002-03-07  H.J. Lu  (hjl@gnu.org)

	* coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
	as the type for bfd_reloc_val.

Index: coff-sh.c
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/coff-sh.c,v
retrieving revision 1.11
diff -u -p -r1.11 coff-sh.c
--- coff-sh.c	2001/09/24 00:03:51	1.11
+++ coff-sh.c	2002/03/07 18:03:00
@@ -469,7 +469,7 @@ coff_sh_rtype_to_howto (abfd, sec, rel, 
 /* This structure is used to map BFD reloc codes to SH PE relocs.  */
 struct shcoff_reloc_map
 {
-  unsigned char bfd_reloc_val;
+  bfd_reloc_code_real_type bfd_reloc_val;
   unsigned char shcoff_reloc_val;
 };
 


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