ruby-changes:52844
From: normal <ko1@a...>
Date: Sat, 13 Oct 2018 14:36:55 +0900 (JST)
Subject: [ruby-changes:52844] normal:r65056 (trunk): addr2line.c: fix *printf type warnings on 32-bit
normal 2018-10-13 14:36:50 +0900 (Sat, 13 Oct 2018) New Revision: 65056 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65056 Log: addr2line.c: fix *printf type warnings on 32-bit Yup, back to using an ancient 32-bit system... Modified files: trunk/addr2line.c Index: addr2line.c =================================================================== --- addr2line.c (revision 65055) +++ addr2line.c (revision 65056) @@ -814,25 +814,27 @@ next_line: https://github.com/ruby/ruby/blob/trunk/addr2line.c#L814 uintptr_t addr = (uintptr_t)traces[i]; uintptr_t d = addr - line->saddr; if (!line->path) { - kprintf("[0x%lx]\n", addr); + kprintf("[0x%"PRIuPTR"]\n", addr); } else if (!line->saddr || !line->sname) { - kprintf("%s(0x%lx) [0x%lx]\n", line->path, addr-line->base_addr, addr); + kprintf("%s(0x%"PRIuPTR") [0x%"PRIuPTR"]\n", line->path, addr-line->base_addr, addr); } else if (line->line <= 0) { - kprintf("%s(%s+0x%lx) [0x%lx]\n", line->path, line->sname, + kprintf("%s(%s+0x%"PRIuPTR") [0x%"PRIuPTR"]\n", line->path, line->sname, d, addr); } else if (!line->filename) { - kprintf("%s(%s+0x%lx) [0x%lx] ???:%d\n", line->path, line->sname, - d, addr, line->line); + kprintf("%s(%s+0x%"PRIuPTR") [0x%"PRIuPTR"] ???:%d\n", + line->path, line->sname, d, addr, line->line); } else if (line->dirname && line->dirname[0]) { - kprintf("%s(%s+0x%lx) [0x%lx] %s/%s:%d\n", line->path, line->sname, + kprintf("%s(%s+0x%"PRIuPTR") [0x%"PRIuPTR"] %s/%s:%d\n", + line->path, line->sname, d, addr, line->dirname, line->filename, line->line); } else { - kprintf("%s(%s+0x%lx) [0x%lx] %s:%d\n", line->path, line->sname, + kprintf("%s(%s+0x%"PRIuPTR") [0x%"PRIuPTR"] %s:%d\n", + line->path, line->sname, d, addr, line->filename, line->line); } /* FreeBSD's backtrace may show _start and so on */ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/