]> mj.ucw.cz Git - libucw.git/commitdiff
Tests: Silenced few warnings on new compilers.
authorPavel Charvat <pchar@ucw.cz>
Sat, 7 Sep 2019 11:01:46 +0000 (11:01 +0000)
committerPavel Charvat <pchar@ucw.cz>
Sat, 7 Sep 2019 11:01:46 +0000 (11:01 +0000)
ucw/hash-test.c

index 157088284bc92a4bc768d3b4cab359e5ad8e20c7..349678b93c1d33cdde5556ca56b9ac1e458d7b57 100644 (file)
@@ -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;