diff options
author | David Robillard <d@drobilla.net> | 2020-08-13 17:25:58 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-13 17:25:58 +0200 |
commit | 92928586a32a122b5aae69bcc212e98d56a34cc0 (patch) | |
tree | 97531fbf05fb118a83d74ebac574fa2b54f1cb95 | |
parent | fc253203d7aa52d866e21576215de6c40c45f9c4 (diff) | |
download | zix-92928586a32a122b5aae69bcc212e98d56a34cc0.tar.gz zix-92928586a32a122b5aae69bcc212e98d56a34cc0.tar.bz2 zix-92928586a32a122b5aae69bcc212e98d56a34cc0.zip |
Fix narrowing conversions
-rw-r--r-- | .clang-tidy | 1 | ||||
-rw-r--r-- | test/sorted_array_test.c | 4 | ||||
-rw-r--r-- | test/tree_test.c | 4 |
3 files changed, 4 insertions, 5 deletions
diff --git a/.clang-tidy b/.clang-tidy index b77d9ae..91058d9 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,7 +1,6 @@ Checks: > *, -*-magic-numbers, - -*-narrowing-conversions, -*-uppercase-literal-suffix, -android-cloexec-fopen, -bugprone-branch-clone, 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; |