PR15206 patch broke build

Alan Modra amodra@gmail.com
Tue Mar 26 23:55:00 GMT 2013


binutils/dwarf.c: In function ‘read_and_display_attr_value’:
binutils/dwarf.c:1588:2: error: field precision specifier ‘.*’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Werror=format]

	* dwarf.c (read_and_display_attr_value): Cast format '*' arg to int.

Index: binutils/dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.127
diff -u -p -r1.127 dwarf.c
--- binutils/dwarf.c	26 Mar 2013 22:51:12 -0000	1.127
+++ binutils/dwarf.c	26 Mar 2013 23:53:49 -0000
@@ -1585,7 +1585,7 @@ read_and_display_attr_value (unsigned lo
 
     case DW_FORM_string:
       if (!do_loc)
-	printf (" %.*s", end - data, data);
+	printf (" %.*s", (int) (end - data), data);
       data += strnlen ((char *) data, end - data) + 1;
       break;
 
-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list