From 80e5de1583163f14ca955fef5fa6db160ce24a10 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sat, 7 Aug 2021 19:34:16 +0200 Subject: [PATCH] fts: Improve GCC 11 allocation-deallocation checking. * lib/fts_.h (fts_open): Declare that deallocation must happen through 'fts_close'. --- ChangeLog | 6 ++++++ lib/fts_.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index db83c3d91c..c8e20f5338 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2021-08-07 Bruno Haible + + 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 eealloc: Improve GCC 11 allocation-deallocation checking. diff --git a/lib/fts_.h b/lib/fts_.h index 9f4419c0a1..13cfa30f3d 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; -- 2.39.5