bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* ino-map: Improve GCC 11 allocation-deallocation checking
@ 2021-08-07 17:48 Bruno Haible
  0 siblings, 0 replies; only message in thread
From: Bruno Haible @ 2021-08-07 17:48 UTC (permalink / raw)
  To: bug-gnulib

2021-08-07  Bruno Haible  <bruno@clisp.org>

	ino-map: Improve GCC 11 allocation-deallocation checking.
	* lib/ino-map.h (ino_map_free): Move declaration up.
	(ino_map_alloc): Declare that deallocation must happen through
	'ino_map_free'.

diff --git a/lib/ino-map.h b/lib/ino-map.h
index fb820f7..ea40f37 100644
--- a/lib/ino-map.h
+++ b/lib/ino-map.h
@@ -23,8 +23,13 @@
 
 # define INO_MAP_INSERT_FAILURE ((size_t) -1)
 
-struct ino_map *ino_map_alloc (size_t);
+struct ino_map;
+
 void ino_map_free (struct ino_map *) _GL_ATTRIBUTE_NONNULL ((1));
+
+struct ino_map *ino_map_alloc (size_t)
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC (ino_map_free, 1);
+
 size_t ino_map_insert (struct ino_map *, ino_t) _GL_ATTRIBUTE_NONNULL ((1));
 
 #endif



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-07 17:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-07 17:48 ino-map: Improve GCC 11 allocation-deallocation checking Bruno Haible

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).