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

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

	fts: Improve GCC 11 allocation-deallocation checking.
	* lib/fts_.h (fts_open): Declare that deallocation must happen through
	'fts_close'.

diff --git a/lib/fts_.h b/lib/fts_.h
index 9f4419c..13cfa30 100644
--- a/lib/fts_.h
+++ b/lib/fts_.h
@@ -260,7 +260,7 @@ int      fts_close (FTS *) __THROW;
 _GL_ATTRIBUTE_NODISCARD
 FTS     *fts_open (char * const *, int,
                    int (*)(const FTSENT **, const FTSENT **))
-  __THROW;
+  _GL_ATTRIBUTE_DEALLOC (fts_close, 1) __THROW;
 
 _GL_ATTRIBUTE_NODISCARD
 FTSENT  *fts_read (FTS *) __THROW;



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

only message in thread, other threads:[~2021-08-07 17:35 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:35 fts: 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).