]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
moved compression adapt to avoid warning
authorPaul Cruz <paulcruz74@fb.com>
Wed, 19 Jul 2017 17:23:46 +0000 (10:23 -0700)
committerPaul Cruz <paulcruz74@fb.com>
Wed, 19 Jul 2017 17:23:46 +0000 (10:23 -0700)
contrib/adaptive-compression/adapt.c

index b928d0a2c4ba96ab393cf54c98da8a0da86632f0..cf908ca94c5cc0d4a39a8f05cf00041290a216bc 100644 (file)
@@ -431,9 +431,12 @@ static void* compressionThread(void* arg)
         DEBUG(3, "compressionThread(): continuing after job ready\n");
         DEBUG(3, "DICTIONARY ENDED\n");
         DEBUG(3, "%.*s", (int)job->src.size, (char*)job->src.start);
+
+        /* adapt compression level */
+        adaptCompressionLevel(ctx);
+        
         /* compress the data */
         {
-            adaptCompressionLevel(ctx);
             unsigned const cLevel = ctx->compressionLevel;
             DEBUG(3, "cLevel used: %u\n", cLevel);
             DEBUG(3, "compression level used: %u\n", cLevel);