bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: fts: Improve GCC 11 allocation-deallocation checking
Date: Sat, 07 Aug 2021 19:35:02 +0200	[thread overview]
Message-ID: <1835012.S91KitNRpm@omega> (raw)

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;



                 reply	other threads:[~2021-08-07 17:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1835012.S91KitNRpm@omega \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).