]> Savannah Git Hosting - gnulib.git/commitdiff
fts: Improve GCC 11 allocation-deallocation checking.
authorBruno Haible <bruno@clisp.org>
Sat, 7 Aug 2021 17:34:16 +0000 (19:34 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 7 Aug 2021 17:34:16 +0000 (19:34 +0200)
* lib/fts_.h (fts_open): Declare that deallocation must happen through
'fts_close'.

ChangeLog
lib/fts_.h

index db83c3d91c5a4d4a047cd6675a4ce11941ac5af1..c8e20f5338b635e1c0a7eaa782094040b24285ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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'.
+
 2021-08-07  Bruno Haible  <bruno@clisp.org>
 
        eealloc: Improve GCC 11 allocation-deallocation checking.
index 9f4419c0a1062a71e20deef1dbeb2210c5781d70..13cfa30f3d5e4cf4065e76a43c5c305dd7043b8a 100644 (file)
@@ -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;