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]

bfd warning fixes


	* elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
	* elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
	* nlmcode.h (nlm_write_object_contents): Warning fix.

Index: bfd/elf32-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-arm.c,v
retrieving revision 1.9
diff -u -p -r1.9 elf32-arm.c
--- bfd/elf32-arm.c	17 Nov 2004 17:50:23 -0000	1.9
+++ bfd/elf32-arm.c	19 Nov 2004 11:02:39 -0000
@@ -5314,8 +5314,8 @@ elf32_arm_finish_dynamic_sections (bfd *
 			  if (dyn.d_tag == DT_RELSZ 
 			      || dyn.d_tag == DT_RELASZ)
 			    dyn.d_un.d_val += hdr->sh_size;
-			  else if (dyn.d_un.d_val == 0
-				   || hdr->sh_offset < dyn.d_un.d_val)
+			  else if ((ufile_ptr) hdr->sh_offset
+				   <= dyn.d_un.d_val - 1)
 			    dyn.d_un.d_val = hdr->sh_offset;
 			}
 		    }
Index: bfd/elf32-iq2000.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-iq2000.c,v
retrieving revision 1.9
diff -u -p -r1.9 elf32-iq2000.c
--- bfd/elf32-iq2000.c	2 Nov 2004 12:52:32 -0000	1.9
+++ bfd/elf32-iq2000.c	19 Nov 2004 11:02:39 -0000
@@ -330,9 +330,8 @@ iq2000_elf_relocate_hi16 (bfd *input_bfd
 }
 
 static reloc_howto_type *
-iq2000_reloc_type_lookup (abfd, code)
-     bfd * abfd ATTRIBUTE_UNUSED;
-     bfd_reloc_code_real_type code;
+iq2000_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
+			  bfd_reloc_code_real_type code)
 {
   /* Note that the iq2000_elf_howto_table is indxed by the R_
      constants.	 Thus, the order that the howto records appear in the
Index: bfd/nlmcode.h
===================================================================
RCS file: /cvs/src/src/bfd/nlmcode.h,v
retrieving revision 1.12
diff -u -p -r1.12 nlmcode.h
--- bfd/nlmcode.h	24 Jun 2004 04:46:25 -0000	1.12
+++ bfd/nlmcode.h	19 Nov 2004 11:02:50 -0000
@@ -1692,7 +1692,7 @@ nlm_write_object_contents (abfd)
 
   /* A weak check on whether the section file positions were
      reasonable.  */
-  if (bfd_tell (abfd) > (ufile_ptr) nlm_fixed_header (abfd)->codeImageOffset)
+  if (bfd_tell (abfd) > nlm_fixed_header (abfd)->codeImageOffset)
     {
       bfd_set_error (bfd_error_invalid_operation);
       goto error_return;

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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