]> granicus.if.org Git - graphviz/commitdiff
circogen position: use a more appropriate type for 'childCount'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 28 Dec 2022 22:01:26 +0000 (14:01 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 1 Jan 2023 00:31:40 +0000 (16:31 -0800)
Squashes a -Wsign-conversion warning.

lib/circogen/circpos.c

index febc2e60a7ee7a36efcc1877bd88411132416512..2e51f00185b28ebf62dd69ad65b560cbbd3d8ff7 100644 (file)
@@ -326,7 +326,7 @@ positionChildren(posinfo_t *pi, posstate *stp, int length, double min_dist)
  * Finally, positionChildren is called to do the actual positioning.
  * If length is 1, keeps track of minimum and maximum child angle.
  */
-static double position(int childCount, int length, nodelist_t *nodepath,
+static double position(size_t childCount, int length, nodelist_t *nodepath,
         block_t * sn, double min_dist)
 {
     nodelistitem_t *item;
@@ -420,11 +420,11 @@ static void doBlock(Agraph_t * g, block_t * sn, double min_dist)
 {
     block_t *child;
     nodelist_t *longest_path;
-    int childCount, length;
+    int length;
     double centerAngle = M_PI;
 
     /* layout child subtrees */
-    childCount = 0;
+    size_t childCount = 0;
     for (child = sn->children.first; child; child = child->next) {
        doBlock(g, child, min_dist);
        childCount++;