From 2ffbde0d9565392438c840c7b34b4a76acb288c6 Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Fri, 28 Aug 2020 14:14:29 -0400 Subject: [PATCH] Fix `-Wshorten-64-to-32` Error --- lib/compress/zstd_lazy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/compress/zstd_lazy.c b/lib/compress/zstd_lazy.c index 15df6125..aa863b8d 100644 --- a/lib/compress/zstd_lazy.c +++ b/lib/compress/zstd_lazy.c @@ -485,7 +485,7 @@ void ZSTD_dedicatedDictSearch_lazy_loadDictionary(ZSTD_matchState_t* ms, const B U32 bucketSize = 1 << ZSTD_LAZY_DDSS_BUCKET_LOG; for ( ; idx < target; idx++) { U32 i; - U32 const h = ZSTD_hashPtr( + size_t const h = ZSTD_hashPtr( ms->window.base + idx, ms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG, ms->cParams.minMatch) << ZSTD_LAZY_DDSS_BUCKET_LOG; @@ -531,8 +531,8 @@ size_t ZSTD_HcFindBestMatch_generic ( const ZSTD_matchState_t* const dms = ms->dictMatchState; const U32 ddsHashLog = dictMode == ZSTD_dedicatedDictSearch ? dms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG : 0; - const U32 ddsIdx = dictMode == ZSTD_dedicatedDictSearch - ? ZSTD_hashPtr(ip, ddsHashLog, mls) << ZSTD_LAZY_DDSS_BUCKET_LOG : 0; + const size_t ddsIdx = dictMode == ZSTD_dedicatedDictSearch + ? ZSTD_hashPtr(ip, ddsHashLog, mls) << ZSTD_LAZY_DDSS_BUCKET_LOG : 0; U32 matchIndex;