summaryrefslogtreecommitdiff
path: root/epan/wmem/wmem_core.h
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-04-25 22:54:36 +0000
committerEvan Huus <eapache@gmail.com>2013-04-25 22:54:36 +0000
commit7d2c6f30004ce23445c268fc8c7035fddac124b4 (patch)
tree8cfcd2e4b346e13d200c4a8b139ccb1954162f88 /epan/wmem/wmem_core.h
parente8fc503c21177616136520bbd57bef88d99d6cd4 (diff)
downloadwireshark-7d2c6f30004ce23445c268fc8c7035fddac124b4.tar.gz
Annotate wmem functions for better compiler warnings and optimization.
svn path=/trunk/; revision=49041
Diffstat (limited to 'epan/wmem/wmem_core.h')
-rw-r--r--epan/wmem/wmem_core.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/epan/wmem/wmem_core.h b/epan/wmem/wmem_core.h
index f9a0af5c3b..4ce51baba9 100644
--- a/epan/wmem/wmem_core.h
+++ b/epan/wmem/wmem_core.h
@@ -45,13 +45,17 @@ typedef struct _wmem_allocator_t wmem_allocator_t;
WS_DLL_PUBLIC
void *
-wmem_alloc(wmem_allocator_t *allocator, const size_t size);
+wmem_alloc(wmem_allocator_t *allocator, const size_t size)
+G_GNUC_MALLOC;
+
#define wmem_new(allocator, type) \
((type*)wmem_alloc((allocator), sizeof(type)))
WS_DLL_PUBLIC
void *
-wmem_alloc0(wmem_allocator_t *allocator, const size_t size);
+wmem_alloc0(wmem_allocator_t *allocator, const size_t size)
+G_GNUC_MALLOC;
+
#define wmem_new0(allocator, type) \
((type*)wmem_alloc0((allocator), sizeof(type)))
@@ -61,7 +65,8 @@ wmem_free(wmem_allocator_t *allocator, void *ptr);
WS_DLL_PUBLIC
void *
-wmem_realloc(wmem_allocator_t *allocator, void *ptr, const size_t size);
+wmem_realloc(wmem_allocator_t *allocator, void *ptr, const size_t size)
+G_GNUC_MALLOC;
WS_DLL_PUBLIC
void