From: Yann Collet Date: Fri, 30 Oct 2015 06:11:07 +0000 (+0100) Subject: fixed minor gcc warning X-Git-Tag: zstd-0.3.0^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc04bcc6d73d67c1f93c92eeb214db322b303ea5;p=thirdparty%2Fzstd.git fixed minor gcc warning --- diff --git a/lib/zstdhc.c b/lib/zstdhc.c index cc5a57c24..499b63bc0 100644 --- a/lib/zstdhc.c +++ b/lib/zstdhc.c @@ -247,6 +247,7 @@ static size_t ZSTD_HC_compressBlock(ZSTD_HC_CCtx* ctx, void* dst, size_t maxDstS const BYTE* anchor = istart; const BYTE* const iend = istart + srcSize; const BYTE* const ilimit = iend - 8; + const BYTE* match = istart; size_t offset_2=REPCODE_STARTVALUE, offset_1=REPCODE_STARTVALUE; const U32 maxSearches = 1 << ctx->params.searchLog; @@ -288,7 +289,6 @@ static size_t ZSTD_HC_compressBlock(ZSTD_HC_CCtx* ctx, void* dst, size_t maxDstS /* search */ { - const BYTE* match; size_t matchLength = ZSTD_HC_insertAndFindBestMatch(ctx, ip, iend, &match, maxSearches); if (!matchLength) { ip++; continue; } /* store sequence */ diff --git a/programs/Makefile b/programs/Makefile index 0e01ffea5..17166013a 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -169,6 +169,8 @@ valgrindTest: zstd datagen fuzzer fullbench valgrind --leak-check=yes --error-exitcode=1 ./datagen -g50M > $(VOID) ./datagen -g16KB > tmp valgrind --leak-check=yes --error-exitcode=1 ./zstd -vf tmp $(VOID) + ./datagen -g2930KB > tmp + valgrind --leak-check=yes --error-exitcode=1 ./zstd -4 -vf tmp $(VOID) ./datagen -g64MB > tmp valgrind --leak-check=yes --error-exitcode=1 ./zstd -vf tmp $(VOID) @rm tmp