]> git.ozlabs.org Git - ccan/blobdiff - ccan/htable/test/run-type-int.c
base64: fix for unsigned chars (e.g. ARM).
[ccan] / ccan / htable / test / run-type-int.c
index 66346d0c70ab24eebcccb13af6f84587ca2c4399..16c4f56ed40a98d2384ee97d23472f11ec7eed9a 100644 (file)
@@ -88,7 +88,7 @@ static void del_vals(struct htable_obj *ht,
 }
 
 static void del_vals_bykey(struct htable_obj *ht,
-                          const struct obj val[], unsigned int num)
+                          const struct obj val[] UNNEEDED, unsigned int num)
 {
        unsigned int i;
 
@@ -112,7 +112,7 @@ static bool check_mask(struct htable *ht, const struct obj val[], unsigned num)
        return true;
 }
 
-int main(int argc, char *argv[])
+int main(void)
 {
        unsigned int i;
        struct htable_obj ht, ht2;
@@ -127,7 +127,7 @@ int main(int argc, char *argv[])
        dne = i;
 
        htable_obj_init(&ht);
-       ok1(ht.raw.max == 0);
+       ok1(ht_max(&ht.raw) == 0);
        ok1(ht.raw.bits == 0);
 
        /* We cannot find an entry which doesn't exist. */
@@ -136,7 +136,7 @@ int main(int argc, char *argv[])
        /* Fill it, it should increase in size. */
        add_vals(&ht, val, NUM_VALS);
        ok1(ht.raw.bits == NUM_BITS + 1);
-       ok1(ht.raw.max < (1 << ht.raw.bits));
+       ok1(ht_max(&ht.raw) < (1 << ht.raw.bits));
 
        /* Mask should be set. */
        ok1(ht.raw.common_mask != 0);