From: Yann Collet Date: Thu, 14 Dec 2017 02:50:05 +0000 (-0800) Subject: fixed minor declaration-after-statement warning X-Git-Tag: v1.3.3^2~8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F950%2Fhead;p=thirdparty%2Fzstd.git fixed minor declaration-after-statement warning --- diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index d52261aae..02235c11a 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -1738,6 +1738,8 @@ static size_t ZSTD_compress_frameChunk (ZSTD_CCtx* cctx, op += cSize; assert(dstCapacity >= cSize); dstCapacity -= cSize; + DEBUGLOG(5, "ZSTD_compress_frameChunk: adding a block of size %u", + (U32)cSize); } } if (lastFrameChunk && (op>ostart)) cctx->stage = ZSTDcs_ending; @@ -3062,8 +3064,6 @@ ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long l size_t const addedSize = srcSizeHint ? 0 : 500; U64 const rSize = srcSizeHint+dictSize ? srcSizeHint+dictSize+addedSize : (U64)-1; U32 const tableID = (rSize <= 256 KB) + (rSize <= 128 KB) + (rSize <= 16 KB); /* intentional underflow for srcSizeHint == 0 */ - DEBUGLOG(4, "ZSTD_getCParams: cLevel=%i, srcSize=%u, dictSize=%u => table %u", - compressionLevel, (U32)srcSizeHint, (U32)dictSize, tableID); #if defined(ZSTD_DEBUG) && (ZSTD_DEBUG>=1) static int g_monotonicTest = 1; @@ -3073,6 +3073,8 @@ ZSTD_compressionParameters ZSTD_getCParams(int compressionLevel, unsigned long l } #endif + DEBUGLOG(4, "ZSTD_getCParams: cLevel=%i, srcSize=%u, dictSize=%u => table %u", + compressionLevel, (U32)srcSizeHint, (U32)dictSize, tableID); if (compressionLevel <= 0) compressionLevel = ZSTD_CLEVEL_DEFAULT; /* 0 == default; no negative compressionLevel yet */ if (compressionLevel > ZSTD_MAX_CLEVEL) compressionLevel = ZSTD_MAX_CLEVEL; { ZSTD_compressionParameters const cp = ZSTD_defaultCParameters[tableID][compressionLevel]; diff --git a/programs/fileio.c b/programs/fileio.c index 879954078..68032af94 100644 --- a/programs/fileio.c +++ b/programs/fileio.c @@ -781,6 +781,8 @@ static int FIO_compressFilename_internal(cRess_t ress, &outBuff, &inBuff, ZSTD_e_continue) ); /* Write compressed stream */ + DISPLAYLEVEL(6, "ZSTD_compress_generic,ZSTD_e_continue: generated %u bytes \n", + (U32)outBuff.pos); if (outBuff.pos) { size_t const sizeCheck = fwrite(ress.dstBuffer, 1, outBuff.pos, dstFile); if (sizeCheck!=outBuff.pos) @@ -816,6 +818,8 @@ static int FIO_compressFilename_internal(cRess_t ress, EXM_THROW(26, "Compression error during frame end : %s", ZSTD_getErrorName(result)); } + DISPLAYLEVEL(6, "ZSTD_compress_generic,ZSTD_e_end: generated %u bytes \n", + (U32)outBuff.pos); { size_t const sizeCheck = fwrite(ress.dstBuffer, 1, outBuff.pos, dstFile); if (sizeCheck != outBuff.pos) EXM_THROW(27, "Write error : cannot write frame end into %s", dstFileName);