mips warning fix

Alan Modra amodra@gmail.com
Wed Oct 19 23:10:00 GMT 2011


Is anyone building mips binutils?  Applied.

	* config/tc-mips.c (micromips_add_label): Avoid gcc warning.
	(md_convert_frag): Likewise.

Index: gas/config/tc-mips.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mips.c,v
retrieving revision 1.488
diff -u -p -r1.488 tc-mips.c
--- gas/config/tc-mips.c	10 Aug 2011 22:55:57 -0000	1.488
+++ gas/config/tc-mips.c	19 Oct 2011 05:00:57 -0000
@@ -3920,6 +3920,8 @@ micromips_add_label (void)
 #if defined(OBJ_ELF) || defined(OBJ_MAYBE_ELF)
   if (IS_ELF)
     S_SET_OTHER (s, ELF_ST_SET_MICROMIPS (S_GET_OTHER (s)));
+#else
+  (void) s;
 #endif
 }
 
@@ -18228,7 +18230,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNU
 			 | RELAX_DELAY_SLOT_SIZE_SECOND);
 	  msg = macro_warning (s);
 	  if (msg != NULL)
-	    as_warn_where (fragp->fr_file, fragp->fr_line, msg);
+	    as_warn_where (fragp->fr_file, fragp->fr_line, "%s", msg);
 	  subtype &= ~s;
 	}
 
@@ -18242,7 +18244,7 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNU
 	       & (RELAX_SECOND_LONGER | RELAX_NOMACRO | RELAX_DELAY_SLOT));
 	  msg = macro_warning (s);
 	  if (msg != NULL)
-	    as_warn_where (fragp->fr_file, fragp->fr_line, msg);
+	    as_warn_where (fragp->fr_file, fragp->fr_line, "%s", msg);
 	  subtype &= ~s;
 	}
 

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list