From: Paul Cruz Date: Mon, 19 Jun 2017 23:27:05 +0000 (-0700) Subject: changed scope to get rid of mixed code/variables warning X-Git-Tag: v1.3.0~1^2~15^2~46 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4f928595bbe0a976fee0ca7e2f0ddf3d10e7374;p=thirdparty%2Fzstd.git changed scope to get rid of mixed code/variables warning --- diff --git a/tests/decodecorpus.c b/tests/decodecorpus.c index 76949a6e7..c4264c9d2 100644 --- a/tests/decodecorpus.c +++ b/tests/decodecorpus.c @@ -1188,16 +1188,18 @@ static int genRandomDict(U32 dictID, U32 seed, size_t dictSize, BYTE* fullDict){ } /* generate samples */ - unsigned i = 1; - size_t currSize = 1; - BYTE* curr = samples; - while (i <= 4) { - *(sampleSizes + i - 1) = currSize; - for (size_t j = 0; j < currSize; j++) { - *(curr++) = (BYTE)i; + { + unsigned i = 1; + size_t currSize = 1; + BYTE* curr = samples; + while (i <= 4) { + *(sampleSizes + i - 1) = currSize; + for (size_t j = 0; j < currSize; j++) { + *(curr++) = (BYTE)i; + } + i++; + currSize *= 16; } - i++; - currSize *= 16; } /* set dictionary params */