File: 0001-suppress-compiler-warning-from-qsort-call.patch

package info (click to toggle)
graphviz 2.42.4-3
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 95,884 kB
  • sloc: ansic: 1,051,566; cpp: 9,107; makefile: 5,538; tcl: 4,897; sh: 4,506; yacc: 4,190; xml: 2,970; cs: 1,921; objc: 1,157; lex: 625; java: 560; perl: 445; python: 255; awk: 241; javascript: 146; ruby: 64; php: 59; sed: 1
file content (26 lines) | stat: -rw-r--r-- 909 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From b571ca4e86ffacb69c6dfe5f38cec27e6c825498 Mon Sep 17 00:00:00 2001
From: Matthew Fernandez <matthew.fernandez@gmail.com>
Date: Fri, 3 Jul 2020 11:21:47 -0700
Subject: [PATCH] suppress compiler warning from qsort() call

---
 lib/common/ns.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/common/ns.c b/lib/common/ns.c
index 282f2ba52..4869272f7 100644
--- a/lib/common/ns.c
+++ b/lib/common/ns.c
@@ -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)
-- 
2.45.2