]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fix minor cast warning 2829/head
authorYann Collet <cyan@fb.com>
Tue, 26 Oct 2021 15:38:17 +0000 (08:38 -0700)
committerYann Collet <cyan@fb.com>
Tue, 26 Oct 2021 15:38:17 +0000 (08:38 -0700)
lib/compress/zstd_compress.c

index 656d3fdfa4aba26afcce1fa7e04421eac2b492da..4bd3abde61b57a456211b23019e34b113fff0689 100644 (file)
@@ -1465,7 +1465,7 @@ static size_t ZSTD_estimateCCtxSize_usingCCtxParams_internal(
         const size_t buffOutSize,
         const U64 pledgedSrcSize)
 {
-    size_t const windowSize = BOUNDED(1, 1 << cParams->windowLog, pledgedSrcSize);
+    size_t const windowSize = (size_t) BOUNDED(1ULL, 1ULL << cParams->windowLog, pledgedSrcSize);
     size_t const blockSize = MIN(ZSTD_BLOCKSIZE_MAX, windowSize);
     U32    const divider = (cParams->minMatch==3) ? 3 : 4;
     size_t const maxNbSeq = blockSize / divider;