[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
fts: Improve GCC 11 allocation-deallocation checking
From: |
Bruno Haible |
Subject: |
fts: Improve GCC 11 allocation-deallocation checking |
Date: |
Sat, 07 Aug 2021 19:35:02 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; ) |
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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- fts: Improve GCC 11 allocation-deallocation checking,
Bruno Haible <=