]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed minor gcc warning
authorYann Collet <yann.collet.73@gmail.com>
Fri, 30 Oct 2015 06:11:07 +0000 (07:11 +0100)
committerYann Collet <yann.collet.73@gmail.com>
Fri, 30 Oct 2015 06:11:07 +0000 (07:11 +0100)
lib/zstdhc.c
programs/Makefile

index cc5a57c24b07704ad895ece6847f6a99db415f26..499b63bc07dc3f5bb704f5c5b35220c27fb7a4a5 100644 (file)
@@ -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 */
index 0e01ffea50a7eb9731309ea39659cbfd75810caf..17166013a9571895a109274008598f78336b9417 100644 (file)
@@ -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