[PATCH] Use 'long long' for printf() format string and ELF64 numbers.
Simon Horman
horms at verge.net.au
Tue May 27 20:09:15 EDT 2008
On Sun, May 25, 2008 at 10:11:54PM +0200, Bernhard Walle wrote:
> Since 'long long' is 64 bit wide on almost any platform, especially on
> 32 bit platforms (like i386) while 'long long' is only 64 bit on 64 bit
> platforms but 32 bit on 32 bit platforms, 'long long' is more suited and
> fixes compiler warnings like
>
> kexec/crashdump-elf.c:160: warning: format '%lx' expects type \
> 'long unsigned int', but argument 4 has type 'Elf64_Off'
> kexec/crashdump-elf.c:160: warning: format '%lx' expects type \
> 'long unsigned int', but argument 5 has type 'Elf64_Addr'
> ...
> kexec/crashdump-elf.c:248: warning: format '%lx' expects type \
> 'long unsigned int', but argument 8 has type 'Elf64_Xword'
>
> Tested on i686-pc-linux-gnu.
>
> Signed-off-by: Bernhard Walle <bwalle at suse.de>
Thanks Bernhard, I've had much less elegant ideas on how to
solve that problem myself.
--
Horms
More information about the kexec
mailing list