[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/27] modechange: improve -fanalyzer malloc checking
From: |
Paul Eggert |
Subject: |
[PATCH 08/27] modechange: improve -fanalyzer malloc checking |
Date: |
Sun, 1 Aug 2021 18:18:02 -0700 |
---
ChangeLog | 2 +-
lib/modechange.h | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 166618a42..dded7f275 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,7 +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, lib/malloca.h:
+ * lib/filenamecat.h, lib/malloca.h, lib/modechange.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/modechange.h b/lib/modechange.h
index 9029fbc61..e32b3c916 100644
--- a/lib/modechange.h
+++ b/lib/modechange.h
@@ -20,10 +20,13 @@
# define MODECHANGE_H_
# include <stdbool.h>
+# include <stdlib.h>
# include <sys/types.h>
-struct mode_change *mode_compile (const char *);
-struct mode_change *mode_create_from_ref (const char *);
+struct mode_change *mode_compile (const char *)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
+struct mode_change *mode_create_from_ref (const char *)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
mode_t mode_adjust (mode_t, bool, mode_t, struct mode_change const *,
mode_t *);
--
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, 2021/08/01
- [PATCH 08/27] modechange: improve -fanalyzer malloc checking,
Paul Eggert <=
- [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
- [PATCH 18/27] xgethostname: improve -fanalyzer malloc checking, Paul Eggert, 2021/08/01