[PATCH] Fix GCC warnings in xorg_backtrace.
Jamey Sharp
jamey at minilop.net
Fri Oct 2 13:42:49 PDT 2009
Signed-off-by: Jamey Sharp <jamey at minilop.net>
---
os/backtrace.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/os/backtrace.c b/os/backtrace.c
index a421140..dafb990 100644
--- a/os/backtrace.c
+++ b/os/backtrace.c
@@ -38,7 +38,7 @@
void xorg_backtrace(void)
{
void *array[64];
- char *mod;
+ const char *mod;
int size, i;
Dl_info info;
ErrorF("\nBacktrace:\n");
@@ -48,10 +48,10 @@ void xorg_backtrace(void)
mod = (info.dli_fname && *info.dli_fname) ? info.dli_fname : "(vdso)";
if (info.dli_saddr)
ErrorF("%d: %s (%s+0x%lx) [%p]\n", i, mod,
- info.dli_sname, array[i] - info.dli_saddr, array[i]);
+ info.dli_sname, (char *) array[i] - (char *) info.dli_saddr, array[i]);
else
ErrorF("%d: %s (%p+0x%lx) [%p]\n", i, mod,
- info.dli_fbase, array[i] - info.dli_fbase, array[i]);
+ info.dli_fbase, (char *) array[i] - (char *) info.dli_fbase, array[i]);
}
}
--
1.6.3.3
More information about the xorg-devel
mailing list