[PATCH] backtrace: fix warnings about pointer types
Thomas Monjalon <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <[email protected]> |
The type ElfW(Addr) is an integer but the rest of the file use true pointers (void*). Explicit casts are needed. Signed-off-by: Thomas Monjalon <[email protected]> --- util/backtrace-symbols.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/util/backtrace-symbols.c b/util/backtrace-symbols.c index 045ad78..0029b49 100644 --- a/util/backtrace-symbols.c +++ b/util/backtrace-symbols.c @@ -296,15 +296,15 @@ static int find_matching_file(struct dl_phdr_info *info, /* This code is modeled from Gfind_proc_info-lsb.c:callback() from libunwind */ long n; const ElfW(Phdr) *phdr; - ElfW(Addr) load_base = info->dlpi_addr; + void *load_base = (void*)info->dlpi_addr; phdr = info->dlpi_phdr; for (n = info->dlpi_phnum; --n >= 0; phdr++) { if (phdr->p_type == PT_LOAD) { - ElfW(Addr) vaddr = phdr->p_vaddr + load_base; + void *vaddr = phdr->p_vaddr + load_base; if (match->address >= vaddr && match->address < vaddr + phdr->p_memsz) { /* we found a match */ match->file = info->dlpi_name; - match->base = info->dlpi_addr; + match->base = (void*)info->dlpi_addr; } } } -- 1.7.7.4 -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo