summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorTakayuki Matsuoka <t-mat@users.noreply.github.com>2021-05-30 00:02:36 (GMT)
committerTakayuki Matsuoka <t-mat@users.noreply.github.com>2021-05-30 07:49:24 (GMT)
commit28cb94f53a4293ffd278f9d9cc72b164055ee623 (patch)
treef19a63a524e17eadf792144487466a3689a89220 /examples
parent634fa2047d217f1c62222071a8313bc5e17d4509 (diff)
downloadlz4-28cb94f53a4293ffd278f9d9cc72b164055ee623.zip
lz4-28cb94f53a4293ffd278f9d9cc72b164055ee623.tar.gz
lz4-28cb94f53a4293ffd278f9d9cc72b164055ee623.tar.bz2
Fix -Wshorten-64-to-32 warning
Fix -Wshorten-64-to-32 warning The following CI test (macOS) reports "-Wshorten-64-to-32" warning make V=1 clean test MOREFLAGS='-Werror -Wconversion -Wno-sign-conversion' ``` blockStreaming_lineByLine.c:68:54: error: implicit conversion loses integer precision: 'const size_t' (aka 'const unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] lz4Stream, inpPtr, cmpBuf, inpBytes, cmpBufBytes, 1); ^~~~~~~~~~~ ```
Diffstat (limited to 'examples')
-rw-r--r--examples/blockStreaming_lineByLine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/blockStreaming_lineByLine.c b/examples/blockStreaming_lineByLine.c
index 19c3345..3047a3a 100644
--- a/examples/blockStreaming_lineByLine.c
+++ b/examples/blockStreaming_lineByLine.c
@@ -65,7 +65,7 @@ static void test_compress(
{
const int cmpBytes = LZ4_compress_fast_continue(
- lz4Stream, inpPtr, cmpBuf, inpBytes, cmpBufBytes, 1);
+ lz4Stream, inpPtr, cmpBuf, inpBytes, (int) cmpBufBytes, 1);
if (cmpBytes <= 0) break;
write_uint16(outFp, (uint16_t) cmpBytes);
write_bin(outFp, cmpBuf, cmpBytes);