]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fixed minor warnings (Visual, conversion, doxygen)
authorcyan4973 <yann.collet.73@gmail.com>
Fri, 20 Jan 2017 22:00:41 +0000 (14:00 -0800)
committercyan4973 <yann.collet.73@gmail.com>
Fri, 20 Jan 2017 22:43:09 +0000 (14:43 -0800)
lib/common/pool.c
lib/compress/zstdmt_compress.c
lib/compress/zstdmt_compress.h

index f40ed39d4ad45a21187b1dacd1e474a04e775dab..693217f243ea393d9eed64931ab3ed36512ff2d4 100644 (file)
@@ -7,13 +7,21 @@
  * of patent rights can be found in the PATENTS file in the same directory.
  */
 
-#include "pool.h"
+
+/* ======   Dependencies   ======= */
 #include <stddef.h>  /* size_t */
 #include <stdlib.h>  /* malloc, calloc, free */
+#include "pool.h"
+
+/* ======   Compiler specifics   ====== */
+#if defined(_MSC_VER)
+#  pragma warning(disable : 4204)        /* disable: C4204: non-constant aggregate initializer */
+#endif
+
 
 #ifdef ZSTD_MULTITHREAD
 
-#include <threading.h>
+#include <threading.h>   /* pthread adaptation */
 
 /* A job is a function and an opaque argument */
 typedef struct POOL_job_s {
index 3674281a45a7c0432d04bca69e40e7e8725ba1ee..48717de206f2af3407320675f715fc8f7cd7cc34 100644 (file)
@@ -1,8 +1,16 @@
+/**
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
 
 
 /* ======   Tuning parameters   ====== */
 #ifndef ZSTDMT_SECTION_LOGSIZE_MIN
-#  define ZSTDMT_SECTION_LOGSIZE_MIN 20   /*< minimum size for a full compression job (20==2^20==1 MB) */
+#  define ZSTDMT_SECTION_LOGSIZE_MIN 20   /* minimum size for a full compression job (20==2^20==1 MB) */
 #endif
 
 
@@ -444,7 +452,7 @@ size_t ZSTDMT_initCStream_advanced(ZSTDMT_CCtx* zcs, const void* dict, size_t di
     zcs->dictSize = dictSize;
     zcs->frameContentSize = pledgedSrcSize;
     zcs->targetSectionSize = (size_t)1 << MAX(ZSTDMT_SECTION_LOGSIZE_MIN, (zcs->params.cParams.windowLog + 2));
-    zcs->inBuffSize = zcs->targetSectionSize + (1 << zcs->params.cParams.windowLog);
+    zcs->inBuffSize = zcs->targetSectionSize + ((size_t)1 << zcs->params.cParams.windowLog);
     zcs->inBuff.buffer = ZSTDMT_getBuffer(zcs->buffPool, zcs->inBuffSize);
     if (zcs->inBuff.buffer.start == NULL) return ERROR(memory_allocation);
     zcs->inBuff.filled = 0;
index 759906db135bcfa4502ae6c1268c5e1d246cc61c..7d336db069a7e62c5bbb332630d049a850888a1f 100644 (file)
@@ -1,3 +1,11 @@
+/**
+ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
+ * All rights reserved.
+ *
+ * This source code is licensed under the BSD-style license found in the
+ * LICENSE file in the root directory of this source tree. An additional grant
+ * of patent rights can be found in the PATENTS file in the same directory.
+ */
 
 /* ===   Dependencies   === */
 #include <stddef.h>   /* size_t */