From: Nick Terrell Date: Wed, 7 Sep 2016 03:27:11 +0000 (-0700) Subject: Fix minor potential narrowing bug X-Git-Tag: v1.1.0~53^2 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F349%2Fhead;p=thirdparty%2Fzstd.git Fix minor potential narrowing bug --- diff --git a/contrib/pzstd/Pzstd.cpp b/contrib/pzstd/Pzstd.cpp index 0caf0f933..87c4c202f 100644 --- a/contrib/pzstd/Pzstd.cpp +++ b/contrib/pzstd/Pzstd.cpp @@ -221,7 +221,7 @@ static size_t calculateStep( std::uintmax_t size, size_t numThreads, const ZSTD_parameters ¶ms) { - size_t step = 1ul << (params.cParams.windowLog + 2); + size_t step = size_t{1} << (params.cParams.windowLog + 2); // If file size is known, see if a smaller step will spread work more evenly if (size != 0) { const std::uintmax_t newStep = size / std::uintmax_t{numThreads};