fixing minor formatting issue in 32-bit mode with logs enabled
This commit is contained in:
@@ -798,8 +798,8 @@ ZSTD_count_2segments(const BYTE* ip, const BYTE* match,
|
|||||||
size_t const matchLength = ZSTD_count(ip, match, vEnd);
|
size_t const matchLength = ZSTD_count(ip, match, vEnd);
|
||||||
if (match + matchLength != mEnd) return matchLength;
|
if (match + matchLength != mEnd) return matchLength;
|
||||||
DEBUGLOG(7, "ZSTD_count_2segments: found a 2-parts match (current length==%zu)", matchLength);
|
DEBUGLOG(7, "ZSTD_count_2segments: found a 2-parts match (current length==%zu)", matchLength);
|
||||||
DEBUGLOG(7, "distance from match beginning to end dictionary = %zi", mEnd - match);
|
DEBUGLOG(7, "distance from match beginning to end dictionary = %i", (int)(mEnd - match));
|
||||||
DEBUGLOG(7, "distance from current pos to end buffer = %zi", iEnd - ip);
|
DEBUGLOG(7, "distance from current pos to end buffer = %i", (int)(iEnd - ip));
|
||||||
DEBUGLOG(7, "next byte : ip==%02X, istart==%02X", ip[matchLength], *iStart);
|
DEBUGLOG(7, "next byte : ip==%02X, istart==%02X", ip[matchLength], *iStart);
|
||||||
DEBUGLOG(7, "final match length = %zu", matchLength + ZSTD_count(ip+matchLength, iStart, iEnd));
|
DEBUGLOG(7, "final match length = %zu", matchLength + ZSTD_count(ip+matchLength, iStart, iEnd));
|
||||||
return matchLength + ZSTD_count(ip+matchLength, iStart, iEnd);
|
return matchLength + ZSTD_count(ip+matchLength, iStart, iEnd);
|
||||||
|
|||||||
@@ -1197,7 +1197,7 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms,
|
|||||||
for (cur = 1; cur <= last_pos; cur++) {
|
for (cur = 1; cur <= last_pos; cur++) {
|
||||||
const BYTE* const inr = ip + cur;
|
const BYTE* const inr = ip + cur;
|
||||||
assert(cur <= ZSTD_OPT_NUM);
|
assert(cur <= ZSTD_OPT_NUM);
|
||||||
DEBUGLOG(7, "cPos:%zi==rPos:%u", inr-istart, cur);
|
DEBUGLOG(7, "cPos:%i==rPos:%u", (int)(inr-istart), cur);
|
||||||
|
|
||||||
/* Fix current position with one literal if cheaper */
|
/* Fix current position with one literal if cheaper */
|
||||||
{ U32 const litlen = opt[cur-1].litlen + 1;
|
{ U32 const litlen = opt[cur-1].litlen + 1;
|
||||||
@@ -1207,8 +1207,8 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms,
|
|||||||
assert(price < 1000000000); /* overflow check */
|
assert(price < 1000000000); /* overflow check */
|
||||||
if (price <= opt[cur].price) {
|
if (price <= opt[cur].price) {
|
||||||
ZSTD_optimal_t const prevMatch = opt[cur];
|
ZSTD_optimal_t const prevMatch = opt[cur];
|
||||||
DEBUGLOG(7, "cPos:%zi==rPos:%u : better price (%.2f<=%.2f) using literal (ll==%u) (hist:%u,%u,%u)",
|
DEBUGLOG(7, "cPos:%i==rPos:%u : better price (%.2f<=%.2f) using literal (ll==%u) (hist:%u,%u,%u)",
|
||||||
inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen,
|
(int)(inr-istart), cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price), litlen,
|
||||||
opt[cur-1].rep[0], opt[cur-1].rep[1], opt[cur-1].rep[2]);
|
opt[cur-1].rep[0], opt[cur-1].rep[1], opt[cur-1].rep[2]);
|
||||||
opt[cur] = opt[cur-1];
|
opt[cur] = opt[cur-1];
|
||||||
opt[cur].litlen = litlen;
|
opt[cur].litlen = litlen;
|
||||||
@@ -1240,8 +1240,8 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
DEBUGLOG(7, "cPos:%zi==rPos:%u : literal would cost more (%.2f>%.2f)",
|
DEBUGLOG(7, "cPos:%i==rPos:%u : literal would cost more (%.2f>%.2f)",
|
||||||
inr-istart, cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price));
|
(int)(inr-istart), cur, ZSTD_fCost(price), ZSTD_fCost(opt[cur].price));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1284,8 +1284,8 @@ ZSTD_compressBlock_opt_generic(ZSTD_matchState_t* ms,
|
|||||||
}
|
}
|
||||||
|
|
||||||
{ U32 const longestML = matches[nbMatches-1].len;
|
{ U32 const longestML = matches[nbMatches-1].len;
|
||||||
DEBUGLOG(7, "cPos:%zi==rPos:%u, found %u matches, of longest ML=%u",
|
DEBUGLOG(7, "cPos:%i==rPos:%u, found %u matches, of longest ML=%u",
|
||||||
inr-istart, cur, nbMatches, longestML);
|
(int)(inr-istart), cur, nbMatches, longestML);
|
||||||
|
|
||||||
if ( (longestML > sufficient_len)
|
if ( (longestML > sufficient_len)
|
||||||
|| (cur + longestML >= ZSTD_OPT_NUM)
|
|| (cur + longestML >= ZSTD_OPT_NUM)
|
||||||
@@ -1411,8 +1411,8 @@ _shortestPath: /* cur, last_pos, best_mlen, best_off have to be set */
|
|||||||
U32 const mlen = opt[storePos].mlen;
|
U32 const mlen = opt[storePos].mlen;
|
||||||
U32 const offBase = opt[storePos].off;
|
U32 const offBase = opt[storePos].off;
|
||||||
U32 const advance = llen + mlen;
|
U32 const advance = llen + mlen;
|
||||||
DEBUGLOG(6, "considering seq starting at %zi, llen=%u, mlen=%u",
|
DEBUGLOG(6, "considering seq starting at %i, llen=%u, mlen=%u",
|
||||||
anchor - istart, (unsigned)llen, (unsigned)mlen);
|
(int)(anchor - istart), (unsigned)llen, (unsigned)mlen);
|
||||||
|
|
||||||
if (mlen==0) { /* only literals => must be last "sequence", actually starting a new stream of sequences */
|
if (mlen==0) { /* only literals => must be last "sequence", actually starting a new stream of sequences */
|
||||||
assert(storePos == storeEnd); /* must be last sequence */
|
assert(storePos == storeEnd); /* must be last sequence */
|
||||||
|
|||||||
@@ -1057,7 +1057,7 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx,
|
|||||||
}
|
}
|
||||||
ZSTD_DCtx_trace_end(dctx, (U64)(op-ostart), (U64)(ip-istart), /* streaming */ 0);
|
ZSTD_DCtx_trace_end(dctx, (U64)(op-ostart), (U64)(ip-istart), /* streaming */ 0);
|
||||||
/* Allow caller to get size read */
|
/* Allow caller to get size read */
|
||||||
DEBUGLOG(4, "ZSTD_decompressFrame: decompressed frame of size %zi, consuming %zi bytes of input", op-ostart, ip - (const BYTE*)*srcPtr);
|
DEBUGLOG(4, "ZSTD_decompressFrame: decompressed frame of size %i, consuming %i bytes of input", (int)(op-ostart), (int)(ip - (const BYTE*)*srcPtr));
|
||||||
*srcPtr = ip;
|
*srcPtr = ip;
|
||||||
*srcSizePtr = remainingSrcSize;
|
*srcSizePtr = remainingSrcSize;
|
||||||
return (size_t)(op-ostart);
|
return (size_t)(op-ostart);
|
||||||
|
|||||||
Reference in New Issue
Block a user