summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <cyan@fb.com>2016-11-11 23:40:58 (GMT)
committerYann Collet <cyan@fb.com>2016-11-11 23:40:58 (GMT)
commit3d456bdf2a72aa617a66eb32e5c7a54f7cd5cb0c (patch)
tree9375854a0c718885cc81858149a3bd37edda0ff4
parentbf6dda69e683f981bc966bd86c01f78936b39689 (diff)
downloadlz4-3d456bdf2a72aa617a66eb32e5c7a54f7cd5cb0c.zip
lz4-3d456bdf2a72aa617a66eb32e5c7a54f7cd5cb0c.tar.gz
lz4-3d456bdf2a72aa617a66eb32e5c7a54f7cd5cb0c.tar.bz2
fixed conversion warnings
-rw-r--r--lib/lz4frame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/lz4frame.c b/lib/lz4frame.c
index 0a29a94..f2424a5 100644
--- a/lib/lz4frame.c
+++ b/lib/lz4frame.c
@@ -204,7 +204,7 @@ const char* LZ4F_getErrorName(LZ4F_errorCode_t code)
LZ4F_errorCodes LZ4F_getErrorCode(size_t functionResult)
{
if (!LZ4F_isError(functionResult)) return LZ4F_OK_NoError;
- return (LZ4F_errorCode_t)(-functionResult);
+ return (LZ4F_errorCodes)(-(ptrdiff_t)functionResult);
}
static LZ4F_errorCode_t err0r(LZ4F_errorCodes code)
@@ -499,7 +499,7 @@ static size_t LZ4F_compressBlock(void* dst, const void* src, size_t srcSize, com
LZ4F_writeLE32(cSizePtr, cSize);
if (cSize == 0) { /* compression failed */
cSize = (U32)srcSize;
- LZ4F_writeLE32(cSizePtr, srcSize | LZ4F_BLOCKUNCOMPRESSED_FLAG);
+ LZ4F_writeLE32(cSizePtr, cSize | LZ4F_BLOCKUNCOMPRESSED_FLAG);
memcpy(cSizePtr+4, src, srcSize);
}
return cSize + 4;