summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-13 17:25:58 +0200
committerDavid Robillard <d@drobilla.net>2020-08-13 17:25:58 +0200
commit92928586a32a122b5aae69bcc212e98d56a34cc0 (patch)
tree97531fbf05fb118a83d74ebac574fa2b54f1cb95 /test
parentfc253203d7aa52d866e21576215de6c40c45f9c4 (diff)
downloadzix-92928586a32a122b5aae69bcc212e98d56a34cc0.tar.gz
zix-92928586a32a122b5aae69bcc212e98d56a34cc0.tar.bz2
zix-92928586a32a122b5aae69bcc212e98d56a34cc0.zip
Fix narrowing conversions
Diffstat (limited to 'test')
-rw-r--r--test/sorted_array_test.c4
-rw-r--r--test/tree_test.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/sorted_array_test.c b/test/sorted_array_test.c
index 30ff139..4bfd515 100644
--- a/test/sorted_array_test.c
+++ b/test/sorted_array_test.c
@@ -41,7 +41,7 @@ int_cmp(const void* a, const void* b, const void* ZIX_UNUSED(user_data))
}
static intptr_t
-ith_elem(int test_num, unsigned n_elems, int i)
+ith_elem(unsigned test_num, unsigned n_elems, unsigned i)
{
switch (test_num % 3) {
case 0:
@@ -61,7 +61,7 @@ test_fail(void)
}
static int
-stress(int test_num, unsigned n_elems)
+stress(unsigned test_num, unsigned n_elems)
{
intptr_t r;
ZixSortedArrayIter ti;
diff --git a/test/tree_test.c b/test/tree_test.c
index 5331344..3e35fb3 100644
--- a/test/tree_test.c
+++ b/test/tree_test.c
@@ -42,7 +42,7 @@ int_cmp(const void* a, const void* b, const void* ZIX_UNUSED(user_data))
}
static uintptr_t
-ith_elem(int test_num, size_t n_elems, size_t i)
+ith_elem(unsigned test_num, size_t n_elems, size_t i)
{
switch (test_num % 3) {
case 0:
@@ -62,7 +62,7 @@ test_fail(void)
}
static int
-stress(int test_num, size_t n_elems)
+stress(unsigned test_num, size_t n_elems)
{
intptr_t r;
ZixTreeIter* ti;