From c56efa40745336c8067f047fe8f736821ddb3791 Mon Sep 17 00:00:00 2001 From: Fabrice Popineau Date: Sat, 8 Dec 2012 14:11:29 +0200 Subject: [PATCH] w32fns.c (emacs_abort): Don't do arithmetics on void pointers. --- src/ChangeLog | 4 ++++ src/w32fns.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 3e8b8519ba3..54985d33b59 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2012-12-08 Fabrice Popineau + + * w32fns.c (emacs_abort): Don't do arithmetics on void pointers. + 2012-12-08 Eli Zaretskii * w32.c (unsetenv, sys_putenv): New functions. diff --git a/src/w32fns.c b/src/w32fns.c index 6801fc68054..1a181079c82 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -7784,7 +7784,7 @@ emacs_abort (void) /* stack[] gives the return addresses, whereas we want the address of the call, so decrease each address by approximate size of 1 CALL instruction. */ - sprintf (buf, "0x%p\r\n", stack[j] - sizeof(void *)); + sprintf (buf, "0x%p\r\n", (char *)stack[j] - sizeof(void *)); if (stderr_fd >= 0) write (stderr_fd, buf, strlen (buf)); if (errfile_fd >= 0) -- 2.39.5