]> granicus.if.org Git - graphviz/commitdiff
remove a couple of sign comparison warnings
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 8 Sep 2020 00:35:06 +0000 (17:35 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 14 Sep 2020 03:51:15 +0000 (20:51 -0700)
lib/common/shapes.c

index 14f0c7add70e0448c1c1a17fdaeecce4292c842a..de7a898e900d8020d6ff22a53d91d0a8c02a8a59 100644 (file)
@@ -14,6 +14,7 @@
 #include <common/render.h>
 #include <common/htmltable.h>
 #include <limits.h>
+#include <stddef.h>
 
 #define RBCONST 12
 #define RBCURVE .5
@@ -3537,7 +3538,8 @@ static void record_init(node_t * n)
 {
     field_t *info;
     pointf ul, sz;
-    int flip, len;
+    int flip;
+    size_t len;
     char *textbuf;             /* temp buffer for storing labels */
     int sides = BOTTOM | RIGHT | TOP | LEFT;
 
@@ -3549,7 +3551,7 @@ static void record_init(node_t * n)
      * we need at least two bytes in textbuf, as well as accounting for the
      * error path involving "\\N" below.
      */
-    len = MAX(MAX(len, 1), (int)strlen("\\N"));
+    len = MAX(MAX(len, 1), strlen("\\N"));
     textbuf = N_NEW(len + 1, char);
     if (!(info = parse_reclbl(n, flip, TRUE, textbuf))) {
        agerr(AGERR, "bad label format %s\n", ND_label(n)->text);