]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
make build tests more unforgiving
authorYann Collet <cyan@fb.com>
Sat, 30 Jun 2018 00:10:56 +0000 (17:10 -0700)
committerYann Collet <cyan@fb.com>
Sat, 30 Jun 2018 00:10:56 +0000 (17:10 -0700)
`-Werror` will ensure they fail if there is the slightest warning.

fix a minor warning specific to `zstd_decompress` variant.

Makefile
programs/zstdcli.c

index 59af7a018a47f881c8d2d0c6269d0d287b99a8a6..0f2fcc958d8fb3fe0c36ff420913cd09ccc31886 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -64,7 +64,7 @@ zlibwrapper:
 
 .PHONY: test
 test:
-       $(MAKE) -C $(PRGDIR) allVariants MOREFLAGS+="-g -DDEBUGLEVEL=1"
+       MOREFLAGS+="-g -DDEBUGLEVEL=1 -Werror" $(MAKE) -C $(PRGDIR) allVariants
        $(MAKE) -C $(TESTDIR) $@
 
 .PHONY: shortest
index be620466791e5485b830b0273897883f303bfaad..cc3ec26c600d505b7e22df1305736e31687e5f16 100644 (file)
@@ -441,7 +441,7 @@ int main(int argCount, const char* argv[])
 #endif
 
     /* preset behaviors */
-    if (exeNameMatch(programName, ZSTD_ZSTDMT)) nbWorkers=0;
+    if (exeNameMatch(programName, ZSTD_ZSTDMT)) nbWorkers=0, singleThread=0;
     if (exeNameMatch(programName, ZSTD_UNZSTD)) operation=zom_decompress;
     if (exeNameMatch(programName, ZSTD_CAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; }   /* supports multiple formats */
     if (exeNameMatch(programName, ZSTD_ZCAT)) { operation=zom_decompress; forceStdout=1; FIO_overwriteMode(); outFileName=stdoutmark; g_displayLevel=1; }  /* behave like zcat, also supports multiple formats */
@@ -764,7 +764,7 @@ int main(int argCount, const char* argv[])
         DISPLAYLEVEL(3, "Note: %d physical core(s) detected \n", nbWorkers);
     }
 #else
-    (void)singleThread;
+    (void)singleThread; (void)nbWorkers;
 #endif
 
 #ifdef UTIL_HAS_CREATEFILELIST