[HarfBuzz] harfbuzz: Branch 'master'

Behdad Esfahbod behdad at kemper.freedesktop.org
Sat Feb 10 20:09:32 UTC 2018


 util/hb-subset.cc |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 4011d885b7fca87c717fdaa4bd0318a42308865a
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Sat Feb 10 14:09:06 2018 -0600

    [util] Remove use of ssize_t which was failing on MSVC

diff --git a/util/hb-subset.cc b/util/hb-subset.cc
index db1ca115..22349ff1 100644
--- a/util/hb-subset.cc
+++ b/util/hb-subset.cc
@@ -72,14 +72,14 @@ struct subset_consumer_t
       fprintf(stderr, "Unable to open output file\n");
       return false;
     }
-    ssize_t bytes_written = fwrite(data, 1, data_length, fp_out);
+    int bytes_written = fwrite(data, 1, data_length, fp_out);
 
     if (bytes_written == -1) {
       fprintf(stderr, "Unable to write output file\n");
       return false;
     }
-    if (bytes_written != data_length) {
-      fprintf(stderr, "Expected %u bytes written, got %ld\n", data_length,
+    if ((unsigned int) bytes_written != data_length) {
+      fprintf(stderr, "Expected %u bytes written, got %d\n", data_length,
               bytes_written);
       return false;
     }


More information about the HarfBuzz mailing list