summaryrefslogtreecommitdiffstats
path: root/src/char
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2023-10-18 15:09:04 (EDT)
committer P. J. McDermott <pj@pehjota.net>2023-10-18 15:14:23 (EDT)
commitc936dbfcd6c26f0d143f01a6c7a5f0f4e27ac6eb (patch)
treea3b31d6b74157bb2d6e4962c84cdedcad37eaf0e /src/char
parent093d80601165e8c751e9eaac2e7b3380d7d5ea06 (diff)
downloadmazefight-c936dbfcd6c26f0d143f01a6c7a5f0f4e27ac6eb.zip
mazefight-c936dbfcd6c26f0d143f01a6c7a5f0f4e27ac6eb.tar.gz
mazefight-c936dbfcd6c26f0d143f01a6c7a5f0f4e27ac6eb.tar.bz2
char/char: Add "__malloc__" attributeHEADmaster
The GCC analyzer looks for unchecked possibly null allocation function call results being dereferenced or passed to functions requiring non- null arguments.
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/char/char.h b/src/char/char.h
index f5054d5..dc79cf6 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -59,7 +59,7 @@ struct mf_char {
};
struct mf_char *
-mf_char_new(size_t size);
+mf_char_new(size_t size) __attribute__((__malloc__));
#define mf_char_init(c, t_c, name) \
do { \