|
From: Tom H. <to...@co...> - 2005-08-07 16:20:17
|
In message <200...@on...>
André Wöbbeking <Woe...@on...> wrote:
> now with 64 bit support shouldn't you check the format strings (see
> attached patch, I'm sure there're more places) to avoid i.e.
>
> symtab.c: In function 'read_symtab':
> symtab.c:1043: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
> symtab.c:1076: warning: format '%p' expects type 'void *', but argument 2 has type 'Addr'
> symtab.c:1076: warning: format '%d' expects type 'int', but argument 3 has type 'Elf64_Xword'
> symtab.c: In function 'read_lib_symbols':
> symtab.c:1443: warning: format '%d' expects type 'int', but argument 2 has type 'Elf64_Off'
> symtab.c:1443: warning: format '%d' expects type 'int', but argument 4 has type 'long unsigned int'
>
> Otherwise tools could break, if their output is parsed (i.e. callgrind).
Your patch is only correct if VG_(printf) uses the same format
characters as printf and with the exact same meaning. I'm not sure
that is necessarily true as VG_(printf) uses it's own formatter
so I would have to check if they do match fully.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|