]> granicus.if.org Git - graphviz/commitdiff
remove use of int as size_t in colorxlate
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 24 Feb 2021 02:14:53 +0000 (18:14 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 2 Mar 2021 06:05:11 +0000 (22:05 -0800)
This removes one -Wconversion and two -Wsign-conversion warnings.

lib/gvpr/actions.c

index 6b2c37daad7e8544e3bdeccf0da836944cd892bb..e5f39986fed8911b70016e549062d69f59c1a404 100644 (file)
@@ -1027,14 +1027,15 @@ int colorxlate(char *str, gvcolor_t * color, color_type_t target_type)
 {
     static hsvrgbacolor_t *last;
     static unsigned char *canon;
-    static int allocated;
+    static size_t allocated;
     unsigned char *p, *q;
     hsvrgbacolor_t fake;
     unsigned char c;
     double H, S, V, A, R, G, B;
     double C, M, Y, K;
     unsigned int r, g, b, a;
-    int len, rc;
+    size_t len;
+    int rc;
 
     color->type = target_type;