]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed Visual compatibility
authorYann Collet <cyan@fb.com>
Thu, 3 Nov 2016 22:52:01 +0000 (15:52 -0700)
committerYann Collet <cyan@fb.com>
Thu, 3 Nov 2016 22:52:01 +0000 (15:52 -0700)
.coverity.yml [deleted file]
lib/compress/zstd_compress.c
programs/zstdcli.c

diff --git a/.coverity.yml b/.coverity.yml
deleted file mode 100644 (file)
index 907f096..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-configurationVersion: 1
-
-filters:
-    # third-party embedded
-    - filePath: lib/dictBuilder/divsufsort.c
index 32059f84d0d656cea16d71967cd17fb9a195d4c2..d152d10dc006ba800825aa8b7ea99f11b1951a1f 100644 (file)
@@ -2695,8 +2695,7 @@ size_t ZSTD_compress_advanced (ZSTD_CCtx* ctx,
 
 size_t ZSTD_compress_usingDict(ZSTD_CCtx* ctx, void* dst, size_t dstCapacity, const void* src, size_t srcSize, const void* dict, size_t dictSize, int compressionLevel)
 {
-    if (!dict) dictSize = 0;
-    ZSTD_parameters params = ZSTD_getParams(compressionLevel, srcSize, dictSize);
+    ZSTD_parameters params = ZSTD_getParams(compressionLevel, srcSize, dict ? dictSize : 0);
     params.fParams.contentSizeFlag = 1;
     return ZSTD_compress_internal(ctx, dst, dstCapacity, src, srcSize, dict, dictSize, params);
 }
index db4d6acc694182972041b11dd12186243d37d3ac..38eef2b566e6950b988ff0e16802abff307b6f6a 100644 (file)
@@ -238,9 +238,9 @@ int main(int argCount, const char* argv[])
 
     /* init */
     (void)recursive; (void)cLevelLast;    /* not used when ZSTD_NOBENCH set */
-    (void)dictCLevel; (void)dictSelect; (void)dictID;  /* not used when ZSTD_NODICT set */
-    (void)cLevel; /* not used when ZSTD_NOCOMPRESS set */
-    (void)ultra; (void)memLimit;   /* not used when ZSTD_NODECOMPRESS set */
+    (void)dictCLevel; (void)dictSelect; (void)dictID;  (void)maxDictSize; /* not used when ZSTD_NODICT set */
+    (void)ultra; (void)cLevel; /* not used when ZSTD_NOCOMPRESS set */
+    (void)memLimit;   /* not used when ZSTD_NODECOMPRESS set */
     if (filenameTable==NULL) { DISPLAY("zstd: %s \n", strerror(errno)); exit(1); }
     filenameTable[0] = stdinmark;
     displayOut = stderr;