]> granicus.if.org Git - graphviz/commitdiff
tcldot myagxset: use a 'size_t' for string length instead of 'int'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 6 Sep 2021 18:15:37 +0000 (11:15 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 9 Sep 2021 03:28:06 +0000 (20:28 -0700)
Squashes a -Wconversion compiler warning.

tclpkg/tcldot/tcldot-util.c

index 4b0162b30ede5e0b371afb3cc800ca5b8081602f..81dc54784517a99f90dba10baa5891a0de27e8cf 100644 (file)
@@ -130,11 +130,10 @@ void deleteGraph(gctx_t * gctx, Agraph_t *g)
 
 static void myagxset(void *obj, Agsym_t *a, char *val)
 {
-    int len;
     char *hs;
 
     if (strcmp(a->name, "label") == 0 && val[0] == '<') {
-        len = strlen(val);
+        size_t len = strlen(val);
         if (val[len-1] == '>') {
             hs = strdup(val+1);
                 *(hs+len-2) = '\0';