emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 12317ff: Fix recent changes in record data type


From: Eli Zaretskii
Subject: [Emacs-diffs] master 12317ff: Fix recent changes in record data type
Date: Tue, 4 Apr 2017 10:57:06 -0400 (EDT)

branch: master
commit 12317ff4fb53f889a69a858a629df6beffacd051
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Fix recent changes in record data type
    
    * src/alloc.c (Fmake_record, Frecord, Fcopy_record): Avoid
    compiler warnings when 'ptrdiff_t' is narrower than 'long int'.
---
 src/alloc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index fe631f2..5024b12 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3424,7 +3424,7 @@ type slot, must fit in PSEUDOVECTOR_SIZE_BITS.  */)
   size = XFASTINT (slots) + 1;
   p = allocate_record (size);
   if (p == NULL)
-    error ("Attempt to allocate a record of %ld slots; max is %d",
+    error ("Attempt to allocate a record of %"pD"d slots; max is %d",
           size, (1 << PSEUDOVECTOR_SIZE_BITS) - 1);
 
   p->contents[0] = type;
@@ -3447,7 +3447,7 @@ usage: (record TYPE &rest SLOTS) */)
 {
   struct Lisp_Vector *p = allocate_record (nargs);
   if (p == NULL)
-    error ("Attempt to allocate a record of %ld slots; max is %d",
+    error ("Attempt to allocate a record of %"pD"d slots; max is %d",
           nargs, (1 << PSEUDOVECTOR_SIZE_BITS) - 1);
 
   Lisp_Object type = args[0];
@@ -3470,7 +3470,7 @@ DEFUN ("copy-record", Fcopy_record, Scopy_record, 1, 1, 0,
   ptrdiff_t size = ASIZE (record) & PSEUDOVECTOR_SIZE_MASK;
   struct Lisp_Vector *new = allocate_record (size);
   if (new == NULL)
-    error ("Attempt to allocate a record of %ld slots; max is %d",
+    error ("Attempt to allocate a record of %"pD"d slots; max is %d",
           size, (1 << PSEUDOVECTOR_SIZE_BITS) - 1);
 
   memcpy (&(new->contents[0]), &(src->contents[0]),



reply via email to

[Prev in Thread] Current Thread [Next in Thread]