Do not assume EMACS_INT is the same width as a pointer.
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 6 May 2011 07:13:19 +0000 (00:13 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 6 May 2011 07:13:19 +0000 (00:13 -0700)
This prepares for a future patch that will prefer 64-bit EMACS_INT if
available.  That patch can be tried now, by compiling with -DWIDE_EMACS_INT,
but it is temporarily not the default so that it can be further tested.

Also, install some other fixes for problems discovered by the static
checking of GCC 4.6.0.

Fixes: debbugs:8545 debbugs:8601 debbugs:8600 debbugs:8602

ChangeLog
doc/lispref/ChangeLog
src/callproc.c
src/doc.c

index 4e675fc..c703869 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-2011-05-05  Paul Eggert  <eggert@cs.ucla.edu>
+2011-05-06  Paul Eggert  <eggert@cs.ucla.edu>
 
        Use C99's va_copy to avoid undefined behavior on x86-64 GNU/Linux.
        * Makefile.in (GNULIB_MODULES): Add stdarg, for va_copy.
index 163de31..7ef3be4 100644 (file)
@@ -1,4 +1,4 @@
-2011-05-03  Paul Eggert  <eggert@cs.ucla.edu>
+2011-05-06  Paul Eggert  <eggert@cs.ucla.edu>
 
        * numbers.texi (Integer Basics): Large integers are treated as floats.
 
index 2763331..9466703 100644 (file)
@@ -590,7 +590,7 @@ usage: (call-process PROGRAM &optional INFILE BUFFER DISPLAY &rest ARGS)  */)
     BLOCK_INPUT;
 
     /* vfork, and prevent local vars from being clobbered by the vfork.  */
-   {
+    {
       int volatile fd_error_volatile = fd_error;
       int volatile fd_output_volatile = fd_output;
       int volatile output_to_buffer_volatile = output_to_buffer;
index d764b66..89a7d32 100644 (file)
--- a/src/doc.c
+++ b/src/doc.c
@@ -506,11 +506,11 @@ store_function_docstring (Lisp_Object fun, EMACS_INT offset)
   /* The type determines where the docstring is stored.  */
 
   /* Lisp_Subrs have a slot for it.  */
-   if (SUBRP (fun))
-     {
-       intptr_t negative_offset = - offset;
-       XSUBR (fun)->doc = (char *) negative_offset;
-     }
+  if (SUBRP (fun))
+    {
+      intptr_t negative_offset = - offset;
+      XSUBR (fun)->doc = (char *) negative_offset;
+    }
 
   /* If it's a lisp form, stick it in the form.  */
   else if (CONSP (fun))