From 81f22eaba6741ffcb9a9f0e18afc1f4d113ba7dd Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 25 Mar 2009 15:39:34 +0000 Subject: Fix test build. svn path=/trunk/libwapcaplet/; revision=6875 --- test/memorytests.c | 2 +- test/testmain.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/memorytests.c b/test/memorytests.c index c289126..7c55cce 100644 --- a/test/memorytests.c +++ b/test/memorytests.c @@ -33,7 +33,7 @@ tracking_allocator(void *ptr, size_t len, void *pw) allocs++; ret = malloc(len + sizeof(size_t)); *(size_t *)ret = len; - return ret + sizeof(size_t); + return ((char *) ret) + sizeof(size_t); } last_op = FREE; allocs--; diff --git a/test/testmain.c b/test/testmain.c index 29df8dc..7c5aee9 100644 --- a/test/testmain.c +++ b/test/testmain.c @@ -11,7 +11,12 @@ #include "tests.h" +#ifndef UNUSED +#define UNUSED(x) ((x) = (x)) +#endif + /* This means that assertion failures are silent in tests */ +extern void __assert_fail(void); void __assert_fail(void) { abort(); } int @@ -19,7 +24,10 @@ main(int argc, char **argv) { int number_failed = 0; SRunner *sr; - + + UNUSED(argc); + UNUSED(argv); + sr = srunner_create(suite_create("Test suite for libwapcaplet")); lwc_basic_suite(sr); -- cgit v1.2.3