From 71650257d7c7e805e25482b431651a4dc9b18727 Mon Sep 17 00:00:00 2001 From: "hp.com!davidm" Date: Thu, 25 Sep 2003 05:29:14 +0000 Subject: [PATCH] (lookup_symbol): Cast arguments to debug printf() so they compile without warning on both 32- and 64-bit platforms. (Logical change 1.104) --- src/elfxx.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/elfxx.c b/src/elfxx.c index 30876cd1..6a5469e0 100644 --- a/src/elfxx.c +++ b/src/elfxx.c @@ -63,8 +63,9 @@ elfW (lookup_symbol) (unw_word_t ip, struct elf_image *ei, if (soff + ehdr->e_shnum * ehdr->e_shentsize > ei->size) { debug (1, "%s: section table outside of image? (%lu > %lu)\n", - __FUNCTION__, soff + ehdr->e_shnum * ehdr->e_shentsize, - ei->size); + __FUNCTION__, + (unsigned long) (soff + ehdr->e_shnum * ehdr->e_shentsize), + (unsigned long) ei->size); return -UNW_ENOINFO; } @@ -84,15 +85,18 @@ elfW (lookup_symbol) (unw_word_t ip, struct elf_image *ei, if (str_soff + ehdr->e_shentsize >= ei->size) { debug (1, "%s: string table outside of image? (%lu >= %lu)\n", - __FUNCTION__, str_soff + ehdr->e_shentsize, ei->size); + __FUNCTION__, + (unsigned long) (str_soff + ehdr->e_shentsize), + (unsigned long) ei->size); break; } str_shdr = (ElfW (Shdr) *) ((char *) ei->image + str_soff); str_size = str_shdr->sh_size; strtab = (char *) ei->image + str_shdr->sh_offset; - debug (160, "symtab=0x%lx[%d], strtab=0x%lx\n", shdr->sh_offset, - shdr->sh_type, str_shdr->sh_offset); + debug (160, "symtab=0x%lx[%d], strtab=0x%lx\n", + (long) shdr->sh_offset, shdr->sh_type, + (long) str_shdr->sh_offset); for (sym = symtab; sym < symtab_end; @@ -105,7 +109,7 @@ elfW (lookup_symbol) (unw_word_t ip, struct elf_image *ei, if (sym->st_shndx != SHN_ABS) val += load_offset; debug (160, "0x%016lx info=0x%02x %s\n", - val, sym->st_info, strtab + sym->st_name); + (long) val, sym->st_info, strtab + sym->st_name); if ((ElfW (Addr)) (ip - val) < min_dist) {