w32fns.c (emacs_abort): Don't do arithmetics on void pointers.

This commit is contained in:
Fabrice Popineau 2012-12-08 14:11:29 +02:00 committed by Eli Zaretskii
parent 75ceee0567
commit c56efa4074
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
2012-12-08 Fabrice Popineau <fabrice.popineau@gmail.com>
* w32fns.c (emacs_abort): Don't do arithmetics on void pointers.
2012-12-08 Eli Zaretskii <eliz@gnu.org>
* w32.c (unsetenv, sys_putenv): New functions.

View file

@ -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)