]> code.delx.au - gnu-emacs/commitdiff
Avoid compiler warnings in w32fns.c:emacs_abort.
authorEli Zaretskii <eliz@gnu.org>
Wed, 18 Dec 2013 16:21:17 +0000 (18:21 +0200)
committerEli Zaretskii <eliz@gnu.org>
Wed, 18 Dec 2013 16:21:17 +0000 (18:21 +0200)
 src/w32fns.c (emacs_abort): Use intptr_t as argument of
 INT_BUFSIZE_BOUND, to avoid compiler warnings.

src/ChangeLog
src/w32fns.c

index 937b5c7c4c4dbe47c1fb3aaf9f1715d356e5f4d3..74fd2bc35b7641b1497cb20462c38b6343d442ea 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-18  Eli Zaretskii  <eliz@gnu.org>
+
+       * w32fns.c (emacs_abort): Use intptr_t as argument of
+       INT_BUFSIZE_BOUND, to avoid compiler warnings.
+
 2013-12-18  Glenn Morris  <rgm@gnu.org>
 
        * lread.c (Fload): Pass load_prefer_newer to openp.
index 8576d478e42d88afe3956e8caab5943e5580da0d..73197c6a8f2777cfdf41e3306232903b0fdde213 100644 (file)
@@ -8422,7 +8422,12 @@ emacs_abort (void)
            int errfile_fd = -1;
            int j;
            char buf[sizeof ("\r\nException  at this address:\r\n\r\n")
-                    + 2 * INT_BUFSIZE_BOUND (void *)];
+                    /* The type below should really be 'void *', but
+                       INT_BUFSIZE_BOUND cannot handle that without
+                       triggering compiler warnings (under certain
+                       pedantic warning switches), it wants an
+                       integer type.  */
+                    + 2 * INT_BUFSIZE_BOUND (intptr_t)];
 #ifdef CYGWIN
            int stderr_fd = 2;
 #else