PATCH: Fix coff-sh.c

H . J . Lu hjl@lucon.org
Thu Mar 7 10:08:00 GMT 2002


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;
 };
 



More information about the Binutils mailing list