summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazuhito Hagio <k-hagio@ab.jp.nec.com>2019-12-11 15:11:37 -0500
committerKazuhito Hagio <k-hagio@ab.jp.nec.com>2019-12-11 15:11:37 -0500
commit49baecc7c13fbfc62679021bc006103dd01c7eb3 (patch)
treee40e62385424f3129e04da6b7eecc7f747915c89
parent5519b3eba68544dc484d85e9540d440d93f8c924 (diff)
[PATCH] Fix compilation warnings on 32-bit system
Suppress the following warnings in get_elf64_phnum() on 32-bit system. elf_info.c: In function 'get_elf64_phnum': elf_info.c:1052: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'Elf64_Off' elf_info.c:1057: warning: format '%lx' expects type 'long unsigned int', but argument 4 has type 'Elf64_Off' Signed-off-by: Kazuhito Hagio <k-hagio@ab.jp.nec.com>
-rw-r--r--elf_info.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/elf_info.c b/elf_info.c
index e9c2671..7d72742 100644
--- a/elf_info.c
+++ b/elf_info.c
@@ -1049,13 +1049,13 @@ get_elf64_phnum(int fd, char *filename, Elf64_Ehdr *ehdr, int *phnum)
*/
if (ehdr->e_phnum == PN_XNUM) {
if (lseek(fd, ehdr->e_shoff, SEEK_SET) < 0) {
- ERRMSG("Can't seek %s at 0x%lx. %s\n", filename,
- ehdr->e_shoff, strerror(errno));
+ ERRMSG("Can't seek %s at 0x%llx. %s\n", filename,
+ (ulonglong)ehdr->e_shoff, strerror(errno));
return FALSE;
}
if (read(fd, &shdr, ehdr->e_shentsize) != ehdr->e_shentsize) {
- ERRMSG("Can't read %s at 0x%lx. %s\n", filename,
- ehdr->e_shoff, strerror(errno));
+ ERRMSG("Can't read %s at 0x%llx. %s\n", filename,
+ (ulonglong)ehdr->e_shoff, strerror(errno));
return FALSE;
}