diff options
author | Bernhard Walle <bwalle@suse.de> | 2008-05-25 22:11:54 +0200 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2008-05-28 10:06:30 +1000 |
commit | bf61432d40c2b2618f17735254090b7653319bb7 (patch) | |
tree | 21b72b8d21c6abbc60456a3dc833368c2039a0d7 | |
parent | 3e2fd34a4c31f8fd7e0646dcd954fcb0ccc8296a (diff) |
Use 'long long' for printf() format string and ELF64 numbers.
Since 'long long' is 64 bit wide on almost any platform, especially on
32 bit platforms (like i386) while 'long' is only 64 bit on 64 bit
platforms but 32 bit on 32 bit platforms. Thus, '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@suse.de>
Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r-- | kexec/crashdump-elf.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kexec/crashdump-elf.c b/kexec/crashdump-elf.c index 7d2befe..f01accb 100644 --- a/kexec/crashdump-elf.c +++ b/kexec/crashdump-elf.c @@ -4,12 +4,12 @@ #endif #if (ELF_WIDTH == 64) -#define dbgprintf_phdr(prefix, phdr) \ -do { \ - dbgprintf("%s: p_type = %u, p_offset = 0x%lx p_paddr = 0x%lx " \ - "p_vaddr = 0x%lx p_filesz = 0x%lx p_memsz = 0x%lx\n", \ - (prefix), (phdr)->p_type, (phdr)->p_offset, (phdr)->p_paddr, \ - (phdr)->p_vaddr, (phdr)->p_filesz, (phdr)->p_memsz); \ +#define dbgprintf_phdr(prefix, phdr) \ +do { \ + dbgprintf("%s: p_type = %u, p_offset = 0x%llx p_paddr = 0x%llx " \ + "p_vaddr = 0x%llx p_filesz = 0x%llx p_memsz = 0x%llx\n", \ + (prefix), (phdr)->p_type, (phdr)->p_offset, (phdr)->p_paddr, \ + (phdr)->p_vaddr, (phdr)->p_filesz, (phdr)->p_memsz); \ } while(0) #else #define dbgprintf_phdr(prefix, phdr) \ |