diff options
Diffstat (limited to 't/unit-tests')
| -rw-r--r-- | t/unit-tests/lib-reftable.c | 2 | ||||
| -rw-r--r-- | t/unit-tests/t-example-decorate.c | 4 | ||||
| -rw-r--r-- | t/unit-tests/t-prio-queue.c | 2 | ||||
| -rw-r--r-- | t/unit-tests/t-reftable-readwrite.c | 2 | ||||
| -rw-r--r-- | t/unit-tests/t-reftable-stack.c | 2 | ||||
| -rw-r--r-- | t/unit-tests/t-trailer.c | 2 | ||||
| -rw-r--r-- | t/unit-tests/test-lib.c | 2 |
7 files changed, 13 insertions, 3 deletions
diff --git a/t/unit-tests/lib-reftable.c b/t/unit-tests/lib-reftable.c index d795dfb7c9..8a69612266 100644 --- a/t/unit-tests/lib-reftable.c +++ b/t/unit-tests/lib-reftable.c @@ -1,3 +1,5 @@ +#define DISABLE_SIGN_COMPARE_WARNINGS + #include "lib-reftable.h" #include "test-lib.h" #include "reftable/constants.h" diff --git a/t/unit-tests/t-example-decorate.c b/t/unit-tests/t-example-decorate.c index 8bf0709c41..bfc776e223 100644 --- a/t/unit-tests/t-example-decorate.c +++ b/t/unit-tests/t-example-decorate.c @@ -42,9 +42,9 @@ static void t_lookup(struct test_vars *vars) static void t_loop(struct test_vars *vars) { - int i, objects_noticed = 0; + int objects_noticed = 0; - for (i = 0; i < vars->n.size; i++) { + for (size_t i = 0; i < vars->n.size; i++) { if (vars->n.entries[i].base) objects_noticed++; } diff --git a/t/unit-tests/t-prio-queue.c b/t/unit-tests/t-prio-queue.c index fe6ae37935..a053635000 100644 --- a/t/unit-tests/t-prio-queue.c +++ b/t/unit-tests/t-prio-queue.c @@ -25,7 +25,7 @@ static void test_prio_queue(int *input, size_t input_size, struct prio_queue pq = { intcmp }; int j = 0; - for (int i = 0; i < input_size; i++) { + for (size_t i = 0; i < input_size; i++) { void *peek, *get; switch(input[i]) { case GET: diff --git a/t/unit-tests/t-reftable-readwrite.c b/t/unit-tests/t-reftable-readwrite.c index 8c4161f365..6b75a419b9 100644 --- a/t/unit-tests/t-reftable-readwrite.c +++ b/t/unit-tests/t-reftable-readwrite.c @@ -6,6 +6,8 @@ license that can be found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd */ +#define DISABLE_SIGN_COMPARE_WARNINGS + #include "test-lib.h" #include "lib-reftable.h" #include "reftable/basics.h" diff --git a/t/unit-tests/t-reftable-stack.c b/t/unit-tests/t-reftable-stack.c index e208e156f0..aeec195b2b 100644 --- a/t/unit-tests/t-reftable-stack.c +++ b/t/unit-tests/t-reftable-stack.c @@ -6,6 +6,8 @@ license that can be found in the LICENSE file or at https://developers.google.com/open-source/licenses/bsd */ +#define DISABLE_SIGN_COMPARE_WARNINGS + #include "test-lib.h" #include "lib-reftable.h" #include "dir.h" diff --git a/t/unit-tests/t-trailer.c b/t/unit-tests/t-trailer.c index e1c6ad7461..184593e73d 100644 --- a/t/unit-tests/t-trailer.c +++ b/t/unit-tests/t-trailer.c @@ -1,3 +1,5 @@ +#define DISABLE_SIGN_COMPARE_WARNINGS + #include "test-lib.h" #include "trailer.h" diff --git a/t/unit-tests/test-lib.c b/t/unit-tests/test-lib.c index fa1f95965c..87e1f5c201 100644 --- a/t/unit-tests/test-lib.c +++ b/t/unit-tests/test-lib.c @@ -1,3 +1,5 @@ +#define DISABLE_SIGN_COMPARE_WARNINGS + #include "test-lib.h" enum result { |
