mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
fixed warnings shown by compiler
This commit is contained in:
@ -87,7 +87,7 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t decompressed_size = ZSTD_get_decompressed_size(input, input_size);
|
size_t decompressed_size = ZSTD_get_decompressed_size(input, input_size);
|
||||||
if (decompressed_size == -1) {
|
if (decompressed_size == (size_t)-1) {
|
||||||
decompressed_size = MAX_COMPRESSION_RATIO * input_size;
|
decompressed_size = MAX_COMPRESSION_RATIO * input_size;
|
||||||
fprintf(stderr, "WARNING: Compressed data does not contain "
|
fprintf(stderr, "WARNING: Compressed data does not contain "
|
||||||
"decompressed size, going to assume the compression "
|
"decompressed size, going to assume the compression "
|
||||||
@ -117,4 +117,3 @@ int main(int argc, char **argv) {
|
|||||||
free(dict);
|
free(dict);
|
||||||
input = output = dict = NULL;
|
input = output = dict = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1374,7 +1374,7 @@ static void execute_sequences(frame_context_t *const ctx, ostream_t *const out,
|
|||||||
// than the offset
|
// than the offset
|
||||||
// ex: if the output so far was "abc", a command with offset=3 and
|
// ex: if the output so far was "abc", a command with offset=3 and
|
||||||
// match_length=6 would produce "abcabcabc" as the new output
|
// match_length=6 would produce "abcabcabc" as the new output
|
||||||
for (size_t i = 0; i < match_length; i++) {
|
for (size_t j = 0; j < match_length; j++) {
|
||||||
*write_ptr = *(write_ptr - offset);
|
*write_ptr = *(write_ptr - offset);
|
||||||
write_ptr++;
|
write_ptr++;
|
||||||
}
|
}
|
||||||
@ -2117,7 +2117,7 @@ static void FSE_init_dtable(FSE_dtable *const dtable,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now we can fill baseline and num bits
|
// Now we can fill baseline and num bits
|
||||||
for (int i = 0; i < size; i++) {
|
for (size_t i = 0; i < size; i++) {
|
||||||
u8 symbol = dtable->symbols[i];
|
u8 symbol = dtable->symbols[i];
|
||||||
u16 next_state_desc = state_desc[symbol]++;
|
u16 next_state_desc = state_desc[symbol]++;
|
||||||
// Fills in the table appropriately, next_state_desc increases by symbol
|
// Fills in the table appropriately, next_state_desc increases by symbol
|
||||||
|
Reference in New Issue
Block a user