From 52b2a77228434349bb25af1e4d512f9f4e1bd293 Mon Sep 17 00:00:00 2001 From: Pavel Charvat Date: Sat, 7 Sep 2019 11:01:46 +0000 Subject: [PATCH] Tests: Silenced few warnings on new compilers. --- ucw/hash-test.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ucw/hash-test.c b/ucw/hash-test.c index 15708828..349678b9 100644 --- a/ucw/hash-test.c +++ b/ucw/hash-test.c @@ -50,7 +50,7 @@ static void test1(void) for (i=0; i<1024; i++) { struct node1 *n = test1_find(i); - if (!n != (i&1) || (n && n->data != i+123)) + if ((!n) != (i&1) || (n && n->data != i+123)) die("Inconsistency at i=%d", i); } i=0; @@ -98,7 +98,7 @@ static void test2(void) struct node2 *n; sprintf(x, "ABC%d", i); n = test2_find(x); - if (!n != (i&1)) + if ((!n) != (i&1)) die("Inconsistency at i=%d", i); } puts("OK"); @@ -142,7 +142,7 @@ static void test3(void) struct node3 *n; sprintf(x, "abc%d", i); n = test3_find(x); - if (!n != (i&1)) + if ((!n) != (i&1)) die("Inconsistency at i=%d", i); } puts("OK"); @@ -234,7 +234,7 @@ static void test4(void) { sprintf(x, "ABC%d", i); n = test4_find(x, i%10); - if (!n != (i&1) || (n && n->data != i)) + if ((!n) != (i&1) || (n && n->data != i)) die("Inconsistency at i=%d", i); } test4_cleanup(); @@ -284,7 +284,7 @@ static void test5(void) for (i=0; i<1024; i++) { struct node5 *n = test5_find(&tab, i); - if (!n != (i&1) || (n && n->data != i+123)) + if ((!n) != (i&1) || (n && n->data != i+123)) die("Inconsistency at i=%d", i); } i=0; -- 2.39.2