From: Nick Terrell Date: Fri, 20 Jan 2023 19:29:52 +0000 (-0800) Subject: Fix -Wstringop-overflow warning X-Git-Tag: v1.5.4^2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc2b3e887607fed7545f3003ce755e918d75999a;p=thirdparty%2Fzstd.git Fix -Wstringop-overflow warning Backported from kernel patch [0]. I wasn't able to reproduce the warning locally, but could repro it in the kernel. [0] https://lore.kernel.org/lkml/20220330193352.GA119296@embeddedor/ --- diff --git a/lib/decompress/huf_decompress.c b/lib/decompress/huf_decompress.c index 400a4e44d..3cafeba53 100644 --- a/lib/decompress/huf_decompress.c +++ b/lib/decompress/huf_decompress.c @@ -934,7 +934,7 @@ static void HUF_fillDTableX2Level2(HUF_DEltX2* DTable, U32 targetLog, const U32 static void HUF_fillDTableX2(HUF_DEltX2* DTable, const U32 targetLog, const sortedSymbol_t* sortedList, - const U32* rankStart, rankVal_t rankValOrigin, const U32 maxWeight, + const U32* rankStart, rankValCol_t* rankValOrigin, const U32 maxWeight, const U32 nbBitsBaseline) { U32* const rankVal = rankValOrigin[0];