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]

some more warning fixes


	* coff-arm.c (coff_arm_is_local_label_name): Warning fix.
	* elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
	* pef.c (bfd_pef_scan): Don't ignore return value of
	bfd_pef_scan_start_address.

Index: bfd/coff-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-arm.c,v
retrieving revision 1.56
diff -u -p -r1.56 coff-arm.c
--- bfd/coff-arm.c	31 Jan 2005 23:13:15 -0000	1.56
+++ bfd/coff-arm.c	16 Feb 2005 02:25:12 -0000
@@ -2504,7 +2504,9 @@ coff_arm_is_local_label_name (abfd, name
 #ifdef USER_LABEL_PREFIX
   if (USER_LABEL_PREFIX[0] != 0)
     {
-      if (strncmp (name, USER_LABEL_PREFIX, strlen (USER_LABEL_PREFIX)) == 0)
+      size_t len = strlen (USER_LABEL_PREFIX);
+
+      if (strncmp (name, USER_LABEL_PREFIX, len) == 0)
 	return FALSE;
     }
 #endif
Index: bfd/elf32-frv.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-frv.c,v
retrieving revision 1.35
diff -u -p -r1.35 elf32-frv.c
--- bfd/elf32-frv.c	7 Feb 2005 07:59:34 -0000	1.35
+++ bfd/elf32-frv.c	16 Feb 2005 02:25:17 -0000
@@ -1144,8 +1144,8 @@ frvfdpic_relocs_info_hash (const void *e
   const struct frvfdpic_relocs_info *entry = entry_;
 
   return (entry->symndx == -1
-	  ? (long)entry->d.h->root.root.hash
-	  : entry->symndx + entry->d.abfd->id * 257) + entry->addend;
+	  ? (long) entry->d.h->root.root.hash
+	  : entry->symndx + (long) entry->d.abfd->id * 257) + entry->addend;
 }
 
 /* Test whether the key fields of two frvfdpic_relocs_info entries are
Index: bfd/pef.c
===================================================================
RCS file: /cvs/src/src/bfd/pef.c,v
retrieving revision 1.11
diff -u -p -r1.11 pef.c
--- bfd/pef.c	31 Jan 2005 23:13:29 -0000	1.11
+++ bfd/pef.c	16 Feb 2005 02:25:18 -0000
@@ -600,7 +600,7 @@ bfd_pef_scan (abfd, header, mdata)
     }
 
   if (bfd_pef_scan_start_address (abfd) < 0)
-    ;
+    return -1;
 
   abfd->tdata.pef_data = mdata;
 

-- 
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]