From fea05cde8b123b38d1a0a8524b77efbc84daa848 Mon Sep 17 00:00:00 2001 From: jangko Date: Tue, 31 Jan 2023 13:00:53 +0700 Subject: [PATCH] reduce compiler warnings --- websock/extensions/compression/deflate.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/websock/extensions/compression/deflate.nim b/websock/extensions/compression/deflate.nim index c4b4abf8..73467c86 100644 --- a/websock/extensions/compression/deflate.nim +++ b/websock/extensions/compression/deflate.nim @@ -183,11 +183,11 @@ proc compress(zs: var ZStream, data: openArray[byte]): seq[byte] = # these casting is needed to prevent compilation # error with CLANG - zs.next_in = cast[ptr cuchar](data[0].unsafeAddr) + zs.next_in = cast[ptr uint8](data[0].unsafeAddr) zs.avail_in = data.len.cuint while true: - zs.next_out = cast[ptr cuchar](buf[0].addr) + zs.next_out = cast[ptr uint8](buf[0].addr) zs.avail_out = buf.len.cuint let r = zs.deflate(Z_SYNC_FLUSH) @@ -210,11 +210,11 @@ proc decompress(zs: var ZStream, limit: int, data: openArray[byte]): seq[byte] = # these casting is needed to prevent compilation # error with CLANG - zs.next_in = cast[ptr cuchar](data[0].unsafeAddr) + zs.next_in = cast[ptr uint8](data[0].unsafeAddr) zs.avail_in = data.len.cuint while true: - zs.next_out = cast[ptr cuchar](buf[0].addr) + zs.next_out = cast[ptr uint8](buf[0].addr) zs.avail_out = buf.len.cuint let r = zs.inflate(Z_NO_FLUSH)