From: Yann Collet Date: Tue, 14 Jun 2016 13:34:24 +0000 (+0200) Subject: fixed conversion warnings X-Git-Tag: v0.7.0^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0590928971f174cc37ee22608cc60e59855c0aa;p=thirdparty%2Fzstd.git fixed conversion warnings --- diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index 42f100bde..b8f7b32a5 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -943,7 +943,7 @@ MEM_STATIC void ZSTD_storeSeq(seqStore_t* seqStorePtr, size_t litLength, const v printf("Cpos %6u :%5u literals & match %3u bytes at distance %6u \n", pos, (U32)litLength, (U32)matchCode+MINMATCH, (U32)offsetCode); #endif - ZSTD_statsUpdatePrices(&seqStorePtr->stats, litLength, literals, offsetCode, matchCode); /* debug only */ + ZSTD_statsUpdatePrices(&seqStorePtr->stats, litLength, (const BYTE*)literals, offsetCode, matchCode); /* debug only */ /* copy Literals */ ZSTD_wildcopy(seqStorePtr->lit, literals, litLength); @@ -1187,8 +1187,8 @@ void ZSTD_compressBlock_fast_generic(ZSTD_CCtx* cctx, } } } /* save reps for next block */ - cctx->savedRep[0] = offset_1 ? offset_1 : (U32)(iend-base); - cctx->savedRep[1] = offset_2 ? offset_2 : (U32)(iend-base); + cctx->savedRep[0] = offset_1 ? (U32)offset_1 : (U32)(iend-base); + cctx->savedRep[1] = offset_2 ? (U32)offset_2 : (U32)(iend-base); /* Last Literals */ { size_t const lastLLSize = iend - anchor; diff --git a/lib/compress/zstd_opt.h b/lib/compress/zstd_opt.h index 82803757a..703b568e2 100644 --- a/lib/compress/zstd_opt.h +++ b/lib/compress/zstd_opt.h @@ -574,7 +574,7 @@ void ZSTD_compressBlock_opt_generic(ZSTD_CCtx* ctx, best_mlen = minMatch; { U32 i; for (i=0; irep[i] = seqState.prevOffset[i]; } + { U32 i; for (i=0; irep[i] = (U32)(seqState.prevOffset[i]); } } /* last literal segment */