]> git.ozlabs.org Git - ccan/blobdiff - ccan/alloc/test/run.c
alloc: dont clash with libc's fls, avoid void pointer arithmetic
[ccan] / ccan / alloc / test / run.c
index e75eddbffe4fabe8b45cd3f6e7f85ef6bc2e17a5..d5b40c8c3708d13a1c138f902d596ba1d8f40691 100644 (file)
@@ -11,7 +11,7 @@
 
 static int addr_cmp(void **a, void **b)
 {
-       return (*a) - (*b);
+       return (char *)(*a) - (char *)(*b);
 }
 
 static bool unique(void *p[], unsigned int num)
@@ -164,7 +164,7 @@ static void test(unsigned int pool_size)
 
 int main(int argc, char *argv[])
 {
-       plan_tests(480);
+       plan_tests(440);
 
        /* Large test. */
        test(MIN_USEFUL_SIZE * 2);