summaryrefslogtreecommitdiffstats
path: root/lz4.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-05-20 00:53:48 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-05-20 00:53:48 (GMT)
commit7f92b091744ec0dd3b5aa8ca2bafadc459606ce8 (patch)
tree958bb70fa58f1818bdf69ed280a748422303da36 /lz4.c
parent4db6b03fceac50961a8f127aa2eda73d3373a1fe (diff)
downloadlz4-7f92b091744ec0dd3b5aa8ca2bafadc459606ce8.zip
lz4-7f92b091744ec0dd3b5aa8ca2bafadc459606ce8.tar.gz
lz4-7f92b091744ec0dd3b5aa8ca2bafadc459606ce8.tar.bz2
Fixed : compilation errors using Visual 2012
Diffstat (limited to 'lz4.c')
-rwxr-xr-x[-rw-r--r--]lz4.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lz4.c b/lz4.c
index 98a6ea8..9a28d68 100644..100755
--- a/lz4.c
+++ b/lz4.c
@@ -492,10 +492,8 @@ int LZ4_compress_generic(
while ((ip>anchor) && (ref > lowLimit) && (unlikely(ip[-1]==ref[-1]))) { ip--; ref--; }
{
- unsigned litLength;
-
/* Encode Literal length */
- litLength = (ip - anchor);
+ unsigned litLength = (unsigned)(ip - anchor);
token = op++;
if ((limitedOutput) && (unlikely(op + litLength + (2 + 1 + LASTLITERALS) + (litLength/255) > oend))) return 0; /* Check output limit */
if (litLength>=RUN_MASK)
@@ -768,7 +766,6 @@ int LZ4_compress_usingDict (LZ4_dict_t* LZ4_dict, const char* source, char* dest
matchLength = LZ4_count(ip+MINMATCH, ref+MINMATCH, matchlimit);
else
{
- matchLength = 0;
const BYTE* dicLimit = ip + (dictEnd - ref);
if (dicLimit > matchlimit) dicLimit = matchlimit;
matchLength = LZ4_count(ip+MINMATCH, ref+MINMATCH, dicLimit);