mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
fixed gcc conversion warnings
This commit is contained in:
@ -60,34 +60,34 @@ int main(int argc, const char** argv)
|
|||||||
{ /* Github issue #FIXME */
|
{ /* Github issue #FIXME */
|
||||||
const size_t compressed_size = 27;
|
const size_t compressed_size = 27;
|
||||||
const uint8_t compressed_data[27] = {
|
const uint8_t compressed_data[27] = {
|
||||||
'\x28',
|
(uint8_t)'\x28',
|
||||||
'\xb5',
|
(uint8_t)'\xb5',
|
||||||
'\x2f',
|
(uint8_t)'\x2f',
|
||||||
'\xfd',
|
(uint8_t)'\xfd',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x32',
|
(uint8_t)'\x32',
|
||||||
'\x91',
|
(uint8_t)'\x91',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x5e',
|
(uint8_t)'\x5e',
|
||||||
'\x2a',
|
(uint8_t)'\x2a',
|
||||||
'\x4d',
|
(uint8_t)'\x4d',
|
||||||
'\x18',
|
(uint8_t)'\x18',
|
||||||
'\x09',
|
(uint8_t)'\x09',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\x00',
|
(uint8_t)'\x00',
|
||||||
'\xb1',
|
(uint8_t)'\xb1',
|
||||||
'\xea',
|
(uint8_t)'\xea',
|
||||||
'\x92',
|
(uint8_t)'\x92',
|
||||||
'\x8f',
|
(uint8_t)'\x8f',
|
||||||
};
|
};
|
||||||
const size_t uncompressed_size = 400;
|
const size_t uncompressed_size = 400;
|
||||||
uint8_t uncompressed_data[400];
|
uint8_t uncompressed_data[400];
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ size_t ZSTD_seekable_endFrame(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer* output
|
|||||||
/* end the frame */
|
/* end the frame */
|
||||||
size_t ret = ZSTD_endStream(zcs->cstream, output);
|
size_t ret = ZSTD_endStream(zcs->cstream, output);
|
||||||
|
|
||||||
zcs->frameCSize += output->pos - prevOutPos;
|
zcs->frameCSize += (U32)(output->pos - prevOutPos);
|
||||||
|
|
||||||
/* need to flush before doing the rest */
|
/* need to flush before doing the rest */
|
||||||
if (ret) return ret;
|
if (ret) return ret;
|
||||||
@ -245,8 +245,8 @@ size_t ZSTD_seekable_compressStream(ZSTD_seekable_CStream* zcs, ZSTD_outBuffer*
|
|||||||
XXH64_update(&zcs->xxhState, inBase, inTmp.pos);
|
XXH64_update(&zcs->xxhState, inBase, inTmp.pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
zcs->frameCSize += output->pos - prevOutPos;
|
zcs->frameCSize += (U32)(output->pos - prevOutPos);
|
||||||
zcs->frameDSize += inTmp.pos;
|
zcs->frameDSize += (U32)inTmp.pos;
|
||||||
|
|
||||||
input->pos += inTmp.pos;
|
input->pos += inTmp.pos;
|
||||||
|
|
||||||
@ -287,7 +287,7 @@ static inline size_t ZSTD_stwrite32(ZSTD_frameLog* fl,
|
|||||||
memcpy((BYTE*)output->dst + output->pos,
|
memcpy((BYTE*)output->dst + output->pos,
|
||||||
tmp + (fl->seekTablePos - offset), lenWrite);
|
tmp + (fl->seekTablePos - offset), lenWrite);
|
||||||
output->pos += lenWrite;
|
output->pos += lenWrite;
|
||||||
fl->seekTablePos += lenWrite;
|
fl->seekTablePos += (U32)lenWrite;
|
||||||
|
|
||||||
if (lenWrite < 4) return ZSTD_seekable_seekTableSize(fl) - fl->seekTablePos;
|
if (lenWrite < 4) return ZSTD_seekable_seekTableSize(fl) - fl->seekTablePos;
|
||||||
}
|
}
|
||||||
@ -336,8 +336,7 @@ size_t ZSTD_seekable_writeSeekTable(ZSTD_frameLog* fl, ZSTD_outBuffer* output)
|
|||||||
|
|
||||||
if (output->size - output->pos < 1) return seekTableLen - fl->seekTablePos;
|
if (output->size - output->pos < 1) return seekTableLen - fl->seekTablePos;
|
||||||
if (fl->seekTablePos < seekTableLen - 4) {
|
if (fl->seekTablePos < seekTableLen - 4) {
|
||||||
BYTE sfd = 0;
|
BYTE const sfd = (BYTE)((fl->checksumFlag) << 7);
|
||||||
sfd |= (fl->checksumFlag) << 7;
|
|
||||||
|
|
||||||
((BYTE*)output->dst)[output->pos] = sfd;
|
((BYTE*)output->dst)[output->pos] = sfd;
|
||||||
output->pos++;
|
output->pos++;
|
||||||
|
Reference in New Issue
Block a user