]> granicus.if.org Git - graphviz/commitdiff
squash some -Wconversion warnings
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 29 Oct 2020 01:18:57 +0000 (18:18 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 4 Nov 2020 15:37:28 +0000 (07:37 -0800)
lib/gvc/gvdevice.c

index e83234d8756c78bd978580743652da897af45456..a1f88711c3b65e8b19b09f4876938b388e99e63b 100644 (file)
@@ -355,14 +355,14 @@ void gvdevice_finalize(GVJ_t * job)
            (job->common->errorfn) ("deflation end problem %d\n", ret);
            exit(1);
        }
-       out[0] = crc;
-       out[1] = crc >> 8;
-       out[2] = crc >> 16;
-       out[3] = crc >> 24;
-       out[4] = z->total_in;
-       out[5] = z->total_in >> 8;
-       out[6] = z->total_in >> 16;
-       out[7] = z->total_in >> 24;
+       out[0] = (unsigned char)crc;
+       out[1] = (unsigned char)(crc >> 8);
+       out[2] = (unsigned char)(crc >> 16);
+       out[3] = (unsigned char)(crc >> 24);
+       out[4] = (unsigned char)z->total_in;
+       out[5] = (unsigned char)(z->total_in >> 8);
+       out[6] = (unsigned char)(z->total_in >> 16);
+       out[7] = (unsigned char)(z->total_in >> 24);
        gvwrite_no_z(job, (char*)out, sizeof(out));
 #else
        (job->common->errorfn) ("No libz support\n");