This is the mail archive of the binutils@sourceware.org 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]

Re: [patch] Add external symbol table file support for gprof


Nick Clifton wrote:
> Hi Homer,
> 
>    (Sorry for the delay in responding to this).
> 
>> The Binutils assignment/disclaimer process is completed. I received the
>> following email from fsf.org yesterday.
> 
>    Great - I have now checked your patch in.  I also added an entry to
> the binutils/NEWS file mentioning this new feature.
> 
> Cheers
>    Nick

Hi,

Due to strict checking of printf/scanf format strings the gcc will issue the 
following warning/error at line 512 of src/gprof/corefile.c when using a 
recent toolchain:
error: format â%lxâ expects type âlong unsigned int *â, but argument 3 has 
type âbfd_vma *â

Regards
Ken
Index: src/gprof/corefile.c
===================================================================
RCS file: /cvs/src/src/gprof/corefile.c,v
retrieving revision 1.34
diff -u -r1.34 corefile.c
--- src/gprof/corefile.c	12 Jun 2009 15:33:30 -0000	1.34
+++ src/gprof/corefile.c	15 Jun 2009 08:13:55 -0000
@@ -509,7 +509,7 @@
 
       sym_init (symtab.limit);
 
-      sscanf (address, "%lx", &(symtab.limit->addr) );
+      sscanf (address, "%lx", (long unsigned int *)&(symtab.limit->addr) );
 
       symtab.limit->name = (char *) xmalloc (strlen (name) + 1);
       strcpy ((char *) symtab.limit->name, name);


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