From 4011d885b7fca87c717fdaa4bd0318a42308865a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 10 Feb 2018 14:09:06 -0600 Subject: [PATCH] [util] Remove use of ssize_t which was failing on MSVC --- util/hb-subset.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- GitLab