]> granicus.if.org Git - graphviz/commitdiff
bcomps split: use a more appropriate type for 'size'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 14 Jan 2023 23:30:32 +0000 (15:30 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 15 Jan 2023 17:51:26 +0000 (09:51 -0800)
Squashes 2 -Wconversion warnings.

cmd/tools/bcomps.c

index 19d8962e6b9ce5bef8d3e7065d9d1c237ef2d74d..fb3c573b2b6e256bd2e6744d1c17a1c420236351 100644 (file)
@@ -294,11 +294,10 @@ static void usage(int v)
 static void split(char *name)
 {
     char *sfx = 0;
-    int size;
 
     sfx = strrchr(name, '.');
     if (sfx) {
-       size = sfx - name;
+       size_t size = (size_t)(sfx - name);
        suffix = sfx + 1;
        path = gv_strndup(name, size);
     } else {