summaryrefslogtreecommitdiffstats
path: root/examples/dictionaryRandomAccess.c
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2022-08-15 22:45:31 (GMT)
committerGitHub <noreply@github.com>2022-08-15 22:45:31 (GMT)
commit5ff839680134437dbf4678f3d0c7b371d84f4964 (patch)
tree939d919c3903b42ed637542a4799fb3f4fa8b5fc /examples/dictionaryRandomAccess.c
parent416bc96faca629abcef42e56ecd2e20d26b79934 (diff)
parentcfd6ab32522280079c2e6d3ea995f172b9ae0312 (diff)
downloadlz4-release.zip
lz4-release.tar.gz
lz4-release.tar.bz2
Merge pull request #1138 from lz4/devv1.9.4release
stage v1.9.4
Diffstat (limited to 'examples/dictionaryRandomAccess.c')
-rw-r--r--examples/dictionaryRandomAccess.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/dictionaryRandomAccess.c b/examples/dictionaryRandomAccess.c
index ecb3b2d..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(
@@ -97,7 +97,7 @@ void test_compress(FILE* outFp, FILE* inpFp, void *dict, int dictSize)
while (ptr != offsetsEnd) {
write_int(outFp, *ptr++);
}
- write_int(outFp, offsetsEnd - offsets);
+ write_int(outFp, (int) (offsetsEnd - offsets));
}
}
@@ -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);