diff options
author | David Robillard <d@drobilla.net> | 2020-11-11 12:22:28 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-11 12:26:56 +0100 |
commit | 3c18febd87234f54c149bb4a6353e3b0e0103db7 (patch) | |
tree | 26c32150fada522778e8df63b747fbe10e7aa3dc /test | |
parent | 387f52cd29b6078d441da5fd07a951a481c10b6d (diff) | |
download | zix-3c18febd87234f54c149bb4a6353e3b0e0103db7.tar.gz zix-3c18febd87234f54c149bb4a6353e3b0e0103db7.tar.bz2 zix-3c18febd87234f54c149bb4a6353e3b0e0103db7.zip |
Add const, pure, and malloc function attributes
Diffstat (limited to 'test')
-rw-r--r-- | test/digest_test.c | 2 | ||||
-rw-r--r-- | test/inline_test.c | 3 | ||||
-rw-r--r-- | test/test_malloc.h | 8 |
3 files changed, 8 insertions, 5 deletions
diff --git a/test/digest_test.c b/test/digest_test.c index a4b2dc9..00a58d9 100644 --- a/test/digest_test.c +++ b/test/digest_test.c @@ -80,7 +80,7 @@ test_ptr(void) assert(zix_digest_add(zix_digest_start(), data, 8 * sizeof(void*)) == d); } -int +ZIX_PURE_FUNC int main(void) { test_bytes(); diff --git a/test/inline_test.c b/test/inline_test.c index c935110..75c43d0 100644 --- a/test/inline_test.c +++ b/test/inline_test.c @@ -16,12 +16,13 @@ #define ZIX_INLINE +#include "zix/common.h" #include "zix/hash.c" #include "zix/tree.c" #include <stddef.h> -int +ZIX_CONST_FUNC int main(void) { zix_hash_free(NULL); diff --git a/test/test_malloc.h b/test/test_malloc.h index ba7cad3..be59008 100644 --- a/test/test_malloc.h +++ b/test/test_malloc.h @@ -14,8 +14,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include "zix/common.h" + #include <stddef.h> -void test_malloc_init(void); -void test_malloc_reset(size_t fail_after); -size_t test_malloc_get_n_allocs(void); +void test_malloc_init(void); +void test_malloc_reset(size_t fail_after); +ZIX_PURE_API size_t test_malloc_get_n_allocs(void); |