]> granicus.if.org Git - graphviz/commitdiff
suppress compiler warning from qsort() call
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 3 Jul 2020 18:21:47 +0000 (11:21 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 3 Jul 2020 18:21:47 +0000 (11:21 -0700)
lib/common/ns.c

index 282f2ba52f6d6020316f00db6631910c798d5589..4869272f73296a60c4b22917d2db0ae4d885fd8b 100644 (file)
@@ -706,7 +706,8 @@ static void TB_balance(void)
     }
     Tree_node.size = ii;
     qsort(Tree_node.list, Tree_node.size, sizeof(Tree_node.list[0]),
-        adj > 1? decreasingrankcmpf : increasingrankcmpf);
+        adj > 1? (int(*)(const void*,const void*))decreasingrankcmpf
+               : (int(*)(const void*,const void*))increasingrankcmpf);
     for (i = 0; i < Tree_node.size; i++) {
         n = Tree_node.list[i];
         if (ND_node_type(n) == NORMAL)