]> granicus.if.org Git - graphviz/commitdiff
common new_queue: squash -Wsign-conversion warning
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 23 Dec 2022 02:50:57 +0000 (18:50 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 24 Dec 2022 18:48:38 +0000 (10:48 -0800)
`sz` is known ≥ 2 here.

lib/common/utils.c

index e670633a0434c4c072352b7e6031bd15caa8080e..e6d1d479a9506c7fc818c92c72f92d43c0f7581d 100644 (file)
@@ -33,7 +33,7 @@ nodequeue *new_queue(int sz)
 
     if (sz <= 1)
        sz = 2;
-    q->head = q->tail = q->store = gv_calloc(sz, sizeof(node_t*));
+    q->head = q->tail = q->store = gv_calloc((size_t)sz, sizeof(node_t*));
     q->limit = q->store + sz;
     return q;
 }