fixed Visual warnings

This commit is contained in:
Yann Collet
2016-01-31 02:51:03 +01:00
parent 61e16ce07c
commit 35f7de52c8
4 changed files with 13 additions and 5 deletions
+2 -2
View File
@@ -457,7 +457,7 @@ static size_t ZSTD_compressLiterals (ZSTD_CCtx* zc,
U32 hType = IS_HUF;
size_t clitSize;
if (maxDstSize < 4) return ERROR(dstSize_tooSmall); /* not enough space for compression */
if (maxDstSize < lhSize+1) return ERROR(dstSize_tooSmall); /* not enough space for compression */
if (zc->flagStaticTables && (lhSize==3)) {
hType = IS_PCH;
@@ -547,7 +547,7 @@ size_t ZSTD_compressSequences(ZSTD_CCtx* zc,
if ((oend-op) < MIN_SEQUENCES_SIZE) return ERROR(dstSize_tooSmall);
if (nbSeq < 128) *op++ = (BYTE)nbSeq;
else {
op[0] = (nbSeq>>8) + 128; op[1] = (BYTE)nbSeq; op+=2;
op[0] = (BYTE)((nbSeq>>8) + 128); op[1] = (BYTE)nbSeq; op+=2;
}
if (nbSeq==0) goto _check_compressibility;