svn commit: r222204 - head/contrib/binutils/binutils

Ben Laurie benl at FreeBSD.org
Sun May 22 22:15:16 UTC 2011


Author: benl
Date: Sun May 22 22:15:16 2011
New Revision: 222204
URL: http://svn.freebsd.org/changeset/base/222204

Log:
  Fix clang warnings.
  
  Approved by:	philip (mentor)

Modified:
  head/contrib/binutils/binutils/objcopy.c
  head/contrib/binutils/binutils/readelf.c
  head/contrib/binutils/binutils/strings.c

Modified: head/contrib/binutils/binutils/objcopy.c
==============================================================================
--- head/contrib/binutils/binutils/objcopy.c	Sun May 22 22:14:15 2011	(r222203)
+++ head/contrib/binutils/binutils/objcopy.c	Sun May 22 22:15:16 2011	(r222204)
@@ -1542,7 +1542,8 @@ copy_object (bfd *ibfd, bfd *obfd)
 	    /* Umm, not sure what to do in this case.  */
 	    debuglink_vma = 0x1000;
 
-	  bfd_set_section_vma (obfd, gnu_debuglink_section, debuglink_vma);
+	  (void) bfd_set_section_vma (obfd, gnu_debuglink_section,
+				      debuglink_vma);
 	}
     }
 

Modified: head/contrib/binutils/binutils/readelf.c
==============================================================================
--- head/contrib/binutils/binutils/readelf.c	Sun May 22 22:14:15 2011	(r222203)
+++ head/contrib/binutils/binutils/readelf.c	Sun May 22 22:15:16 2011	(r222204)
@@ -9701,7 +9701,7 @@ process_archive (char *file_name, FILE *
 	}
 
       if ((longnames_size & 1) != 0)
-	getc (file);
+	(void) getc (file);
 
       got = fread (&arhdr, 1, sizeof arhdr, file);
       if (got != sizeof arhdr)

Modified: head/contrib/binutils/binutils/strings.c
==============================================================================
--- head/contrib/binutils/binutils/strings.c	Sun May 22 22:14:15 2011	(r222203)
+++ head/contrib/binutils/binutils/strings.c	Sun May 22 22:15:16 2011	(r222204)
@@ -593,7 +593,7 @@ print_strings (const char *filename, FIL
 	  case 8:
 #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
 	    if (sizeof (start) > sizeof (long))
-	      printf ("%7Lo ", (unsigned long long) start);
+	      printf ("%7llo ", (unsigned long long) start);
 	    else
 #else
 # if !BFD_HOST_64BIT_LONG
@@ -608,7 +608,7 @@ print_strings (const char *filename, FIL
 	  case 10:
 #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
 	    if (sizeof (start) > sizeof (long))
-	      printf ("%7Ld ", (unsigned long long) start);
+	      printf ("%7lld ", (unsigned long long) start);
 	    else
 #else
 # if !BFD_HOST_64BIT_LONG
@@ -623,7 +623,7 @@ print_strings (const char *filename, FIL
 	  case 16:
 #if __STDC_VERSION__ >= 199901L || (defined(__GNUC__) && __GNUC__ >= 2)
 	    if (sizeof (start) > sizeof (long))
-	      printf ("%7Lx ", (unsigned long long) start);
+	      printf ("%7llx ", (unsigned long long) start);
 	    else
 #else
 # if !BFD_HOST_64BIT_LONG


More information about the svn-src-all mailing list