]> granicus.if.org Git - graphviz/commitdiff
gvwrite: use more conforming type when calling 'deflate'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 11 Nov 2021 01:27:19 +0000 (17:27 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 17 Nov 2021 01:01:04 +0000 (17:01 -0800)
This is what the zlib API documents `deflate` as returning. Squashes a
-Wsign-conversion warning.

lib/gvc/gvdevice.c

index 5fea75809249c0d60f2bf55b53dd546d786cc52b..84a76187cfdb22573f4fc184812ea74cb0a00a53 100644 (file)
@@ -221,9 +221,9 @@ size_t gvwrite (GVJ_t * job, const char *s, size_t len)
        while (z->avail_in) {
            z->next_out = df;
            z->avail_out = dfallocated;
-           ret=deflate (z, Z_NO_FLUSH);
-           if (ret != Z_OK) {
-                (job->common->errorfn) ("deflation problem %d\n", ret);
+           int r = deflate(z, Z_NO_FLUSH);
+           if (r != Z_OK) {
+                (job->common->errorfn) ("deflation problem %d\n", r);
                exit(1);
            }