summary refs log tree commit diff
path: root/bin/glitch.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-06-07 15:04:16 -0400
committerJune McEnroe <june@causal.agency>2020-06-07 15:04:16 -0400
commit5b1657f1d6f3e7f6f8f75d3601e57c566ac6a3bb (patch)
tree77ad9f5d2a85de978677e8db439f57e4a3e00a65 /bin/glitch.c
parentCall static_assert by _Static_assert (diff)
downloadsrc-5b1657f1d6f3e7f6f8f75d3601e57c566ac6a3bb.tar.gz
src-5b1657f1d6f3e7f6f8f75d3601e57c566ac6a3bb.zip
Cast z_stream fields to size_t
In the version of zlib in OpenBSD, these fields are of type off_t, which
is signed (why?), rather than uLong.
Diffstat (limited to 'bin/glitch.c')
-rw-r--r--bin/glitch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/glitch.c b/bin/glitch.c
index 3d8bc8f7..9747f35a 100644
--- a/bin/glitch.c
+++ b/bin/glitch.c
@@ -238,10 +238,10 @@ static void readData(void) {
 	}
 
 	inflateEnd(&stream);
-	if (stream.total_out != dataSize()) {
+	if ((size_t)stream.total_out != dataSize()) {
 		errx(
-			EX_DATAERR, "%s: expected data size %zu, found %lu",
-			path, dataSize(), stream.total_out
+			EX_DATAERR, "%s: expected data size %zu, found %zu",
+			path, dataSize(), (size_t)stream.total_out
 		);
 	}
 }