From 1b0a501a198873fd12969c37b51623cc25e1771f Mon Sep 17 00:00:00 2001 From: Takayuki Matsuoka Date: Tue, 7 Sep 2021 01:02:23 +0900 Subject: Add cast operator for compatibility with C++ --- examples/dictionaryRandomAccess.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/dictionaryRandomAccess.c b/examples/dictionaryRandomAccess.c index f7d1b67..3aa4609 100644 --- a/examples/dictionaryRandomAccess.c +++ b/examples/dictionaryRandomAccess.c @@ -78,7 +78,7 @@ void test_compress(FILE* outFp, FILE* inpFp, void *dict, int dictSize) } /* Forget previously compressed data and load the dictionary */ - LZ4_loadDict(lz4Stream, dict, dictSize); + LZ4_loadDict(lz4Stream, (const char*) dict, dictSize); { char cmpBuf[LZ4_COMPRESSBOUND(BLOCK_BYTES)]; const int cmpBytes = LZ4_compress_fast_continue( @@ -153,7 +153,7 @@ void test_decompress(FILE* outFp, FILE* inpFp, void *dict, int dictSize, int off } /* Load the dictionary */ - LZ4_setStreamDecode(lz4StreamDecode, dict, dictSize); + LZ4_setStreamDecode(lz4StreamDecode, (const char*) dict, dictSize); { const int decBytes = LZ4_decompress_safe_continue( lz4StreamDecode, cmpBuf, decBuf, cmpBytes, BLOCK_BYTES); -- cgit v0.12