mirror of
https://github.com/facebook/zstd.git
synced 2025-10-08 00:04:02 -04:00
fixed minor warnings (Visual, conversion, doxygen)
This commit is contained in:
parent
5fba09fa41
commit
2e3b659ae1
@ -7,13 +7,21 @@
|
|||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "pool.h"
|
|
||||||
|
/* ====== Dependencies ======= */
|
||||||
#include <stddef.h> /* size_t */
|
#include <stddef.h> /* size_t */
|
||||||
#include <stdlib.h> /* malloc, calloc, free */
|
#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
|
#ifdef ZSTD_MULTITHREAD
|
||||||
|
|
||||||
#include <threading.h>
|
#include <threading.h> /* pthread adaptation */
|
||||||
|
|
||||||
/* A job is a function and an opaque argument */
|
/* A job is a function and an opaque argument */
|
||||||
typedef struct POOL_job_s {
|
typedef struct POOL_job_s {
|
||||||
|
@ -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 ====== */
|
/* ====== Tuning parameters ====== */
|
||||||
#ifndef ZSTDMT_SECTION_LOGSIZE_MIN
|
#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
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -444,7 +452,7 @@ size_t ZSTDMT_initCStream_advanced(ZSTDMT_CCtx* zcs, const void* dict, size_t di
|
|||||||
zcs->dictSize = dictSize;
|
zcs->dictSize = dictSize;
|
||||||
zcs->frameContentSize = pledgedSrcSize;
|
zcs->frameContentSize = pledgedSrcSize;
|
||||||
zcs->targetSectionSize = (size_t)1 << MAX(ZSTDMT_SECTION_LOGSIZE_MIN, (zcs->params.cParams.windowLog + 2));
|
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);
|
zcs->inBuff.buffer = ZSTDMT_getBuffer(zcs->buffPool, zcs->inBuffSize);
|
||||||
if (zcs->inBuff.buffer.start == NULL) return ERROR(memory_allocation);
|
if (zcs->inBuff.buffer.start == NULL) return ERROR(memory_allocation);
|
||||||
zcs->inBuff.filled = 0;
|
zcs->inBuff.filled = 0;
|
||||||
|
@ -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 === */
|
/* === Dependencies === */
|
||||||
#include <stddef.h> /* size_t */
|
#include <stddef.h> /* size_t */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user