Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-08-06 00:57:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-08-06 00:57:13 +0400
commitce2e2b141e67e5be8cc85bc394dc6ca9e15f774b (patch)
tree50508e0df59ab92fce66648e354a337d5de20fce /source/blender/blenlib/BLI_memarena.h
parentb438c2840cbf533830ecb29b1ef65325d3f77f73 (diff)
use gcc malloc attribute for low level allocation functions, prevents gcc from checking if resulting pointers alias existing pointers, also use sentinel attribute for uiButGetStrInfo so incorrect usage gives a warning.
Diffstat (limited to 'source/blender/blenlib/BLI_memarena.h')
-rw-r--r--source/blender/blenlib/BLI_memarena.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_memarena.h b/source/blender/blenlib/BLI_memarena.h
index 092bb639b91..d54dab42e05 100644
--- a/source/blender/blenlib/BLI_memarena.h
+++ b/source/blender/blenlib/BLI_memarena.h
@@ -55,6 +55,7 @@ typedef struct MemArena MemArena;
struct MemArena *BLI_memarena_new(const int bufsize, const char *name)
#if MEM_GNU_ATTRIBUTES
+__attribute__((malloc))
__attribute__((warn_unused_result))
__attribute__((nonnull(2)))
#endif
@@ -85,6 +86,7 @@ __attribute__((nonnull(1)))
void *BLI_memarena_alloc(struct MemArena *ma, int size)
#if MEM_GNU_ATTRIBUTES
+__attribute__((malloc))
__attribute__((warn_unused_result))
__attribute__((nonnull(1)))
__attribute__((alloc_size(2)))