From: Fabrice Popineau Date: Sat, 8 Dec 2012 12:11:29 +0000 (+0200) Subject: w32fns.c (emacs_abort): Don't do arithmetics on void pointers. X-Git-Tag: emacs-24.3.90~173^2~9^2~4 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c56efa40745336c8067f047fe8f736821ddb3791;p=emacs.git w32fns.c (emacs_abort): Don't do arithmetics on void pointers. --- 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)