]> git.eshelyaron.com Git - emacs.git/commitdiff
Pacify gcc -Wsuggest-attribute=malloc
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 21 Jan 2024 00:52:31 +0000 (16:52 -0800)
committerEshel Yaron <me@eshelyaron.com>
Sun, 21 Jan 2024 07:31:06 +0000 (08:31 +0100)
* src/lisp.h (hash_table_alloc_bytes):
Declare with ATTRIBUTE_MALLOC_SIZE ((1)).

(cherry picked from commit 973c1b8a1838b78d1388437c2aa7f4eb4dceb7d9)

src/lisp.h

index 64492361e64aa4461f40696a222c395a34ce1628..d9448f476e731c1eb182ad93e5d212722c20ac2d 100644 (file)
@@ -4475,7 +4475,7 @@ extern void syms_of_alloc (void);
 extern struct buffer *allocate_buffer (void) ATTRIBUTE_RETURNS_NONNULL;
 extern int valid_lisp_object_p (Lisp_Object);
 
-void *hash_table_alloc_bytes (ptrdiff_t nbytes);
+void *hash_table_alloc_bytes (ptrdiff_t nbytes) ATTRIBUTE_MALLOC_SIZE ((1));
 void hash_table_free_bytes (void *p, ptrdiff_t nbytes);
 
 /* Defined in gmalloc.c.  */