fixed visual warnings
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
# include <intrin.h> /* For Visual 2005 */
|
# include <intrin.h> /* For Visual 2005 */
|
||||||
# pragma warning(disable : 4100) /* disable: C4100: unreferenced formal parameter */
|
# pragma warning(disable : 4100) /* disable: C4100: unreferenced formal parameter */
|
||||||
# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
|
# pragma warning(disable : 4127) /* disable: C4127: conditional expression is constant */
|
||||||
|
# pragma warning(disable : 4204) /* disable: C4204: non-constant aggregate initializer */
|
||||||
# pragma warning(disable : 4324) /* disable: C4324: padded structure */
|
# pragma warning(disable : 4324) /* disable: C4324: padded structure */
|
||||||
#else
|
#else
|
||||||
# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
|
# if defined (__cplusplus) || defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 */
|
||||||
|
|||||||
@@ -3765,7 +3765,8 @@ size_t ZSTD_compress_generic_simpleArgs (
|
|||||||
* @return : amount of data remaining to flush */
|
* @return : amount of data remaining to flush */
|
||||||
size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output)
|
size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output)
|
||||||
{
|
{
|
||||||
ZSTD_inBuffer input = { &input, 0, 0 };
|
const char dummy[8] = {0};
|
||||||
|
ZSTD_inBuffer input = { dummy, 0, 0 };
|
||||||
if (output->pos > output->size) return ERROR(GENERIC);
|
if (output->pos > output->size) return ERROR(GENERIC);
|
||||||
CHECK_F( ZSTD_compressStream_generic(zcs, output, &input, ZSTD_e_flush) );
|
CHECK_F( ZSTD_compressStream_generic(zcs, output, &input, ZSTD_e_flush) );
|
||||||
return zcs->outBuffContentSize - zcs->outBuffFlushedSize; /* remaining to flush */
|
return zcs->outBuffContentSize - zcs->outBuffFlushedSize; /* remaining to flush */
|
||||||
@@ -3774,7 +3775,8 @@ size_t ZSTD_flushStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output)
|
|||||||
|
|
||||||
size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output)
|
size_t ZSTD_endStream(ZSTD_CStream* zcs, ZSTD_outBuffer* output)
|
||||||
{
|
{
|
||||||
ZSTD_inBuffer input = { &input, 0, 0 };
|
const char dummy[8] = {0};
|
||||||
|
ZSTD_inBuffer input = { dummy, 0, 0 };
|
||||||
if (output->pos > output->size) return ERROR(GENERIC);
|
if (output->pos > output->size) return ERROR(GENERIC);
|
||||||
CHECK_F( ZSTD_compressStream_generic(zcs, output, &input, ZSTD_e_end) );
|
CHECK_F( ZSTD_compressStream_generic(zcs, output, &input, ZSTD_e_end) );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user