[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/27] filenamecat-lgpl: improve -fanalyzer malloc checking
From: |
Paul Eggert |
Subject: |
[PATCH 06/27] filenamecat-lgpl: improve -fanalyzer malloc checking |
Date: |
Sun, 1 Aug 2021 18:18:00 -0700 |
---
ChangeLog | 1 +
lib/filenamecat.h | 9 +++++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index bac4c5fcc..6bad8ceb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
maint: improve -fanalyzer malloc checking
* lib/backup-internal.h, lib/backupfile.h:
* lib/canonicalize.h, lib/dfa.h, lib/dirname.h, lib/exclude.h:
+ * lib/filenamecat.h:
Add malloc-related attributes and include stdlib.h as needed.
* lib/dfa.c: Include verify.h.
(assume_nonnull): New macro.
diff --git a/lib/filenamecat.h b/lib/filenamecat.h
index e2ff46659..e5acb1588 100644
--- a/lib/filenamecat.h
+++ b/lib/filenamecat.h
@@ -18,10 +18,15 @@
/* Written by Jim Meyering. */
+#include <stdlib.h>
+
#if GNULIB_FILENAMECAT
char *file_name_concat (char const *dir, char const *base,
- char **base_in_result);
+ char **base_in_result)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+ _GL_ATTRIBUTE_RETURNS_NONNULL;
#endif
char *mfile_name_concat (char const *dir, char const *base,
- char **base_in_result);
+ char **base_in_result)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
--
2.31.1
- [PATCH 01/27] backupfile: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 02/27] maint: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 03/27] dfa: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 04/27] dirname: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 05/27] exclude: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 06/27] filenamecat-lgpl: improve -fanalyzer malloc checking,
Paul Eggert <=
- [PATCH 08/27] modechange: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 07/27] malloca: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 09/27] mountlist: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 10/27] pagalign_alloc: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 11/27] quotearg: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 14/27] sh-quote: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 12/27] readutmp: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01
- [PATCH 16/27] trim: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01