coder->pos = 0;
coder->sequence = SEQ_CODER_INIT;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_CODER_INIT: {
if (coder->memusage > coder->memlimit)
return LZMA_GET_CHECK;
}
- // Fall through
+ FALLTHROUGH;
case SEQ_CODE: {
const lzma_ret ret = coder->next.code(
return ret;
coder->sequence = SEQ_FINISH;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_FINISH:
// When LZMA_CONCATENATED was used and we were decoding
// a LZMA_Alone file, we need to check that there is no
coder->block->uncompressed_size = coder->uncompressed_size;
coder->sequence = SEQ_PADDING;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_PADDING:
// Compressed Data is padded to a multiple of four bytes.
while (coder->compressed_size & 3) {
lzma_check_finish(&coder->check, coder->block->check);
coder->sequence = SEQ_CHECK;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_CHECK: {
const size_t check_size = lzma_check_size(coder->block->check);
coder->block->uncompressed_size = coder->uncompressed_size;
coder->sequence = SEQ_PADDING;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_PADDING:
// Pad Compressed Data to a multiple of four bytes. We can
// use coder->compressed_size for this since we don't need
lzma_check_finish(&coder->check, coder->block->check);
coder->sequence = SEQ_CHECK;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_CHECK: {
const size_t check_size = lzma_check_size(coder->block->check);
else
strm->internal->sequence = ISEQ_END;
- // Fall through
+ FALLTHROUGH;
case LZMA_NO_CHECK:
case LZMA_UNSUPPORTED_CHECK:
// Start looking for Stream Padding and Stream Footer
// at the end of the file.
coder->file_target_pos = coder->file_size;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_PADDING_SEEK:
coder->sequence = SEQ_PADDING_DECODE;
return_if_error(reverse_seek(
coder, in_start, in_pos, in_size));
-
- // Fall through
+ FALLTHROUGH;
case SEQ_PADDING_DECODE: {
// Copy to coder->temp first. This keeps the code simpler if
if (coder->temp_size < LZMA_STREAM_HEADER_SIZE)
return_if_error(reverse_seek(
coder, in_start, in_pos, in_size));
- }
- // Fall through
+ FALLTHROUGH;
+ }
case SEQ_FOOTER:
// Copy the Stream Footer field into coder->temp.
return LZMA_SEEK_NEEDED;
}
- // Fall through
+ FALLTHROUGH;
case SEQ_INDEX_INIT: {
// Calculate the amount of memory already used by the earlier
coder->index_remaining = coder->footer_flags.backward_size;
coder->sequence = SEQ_INDEX_DECODE;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_INDEX_DECODE: {
// Decode (a part of) the Index. If the whole Index is already
// in coder->temp, read it from there. Otherwise read from
return_if_error(reverse_seek(coder,
in_start, in_pos, in_size));
}
- }
- // Fall through
+ FALLTHROUGH;
+ }
case SEQ_HEADER_DECODE:
// Copy the Stream Header field into coder->temp.
coder->temp + coder->temp_size)));
coder->sequence = SEQ_HEADER_COMPARE;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_HEADER_COMPARE:
// Compare Stream Header against Stream Footer. They must
coder->pos = 0;
coder->sequence = SEQ_MEMUSAGE;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_MEMUSAGE:
if (lzma_index_memusage(1, coder->count) > coder->memlimit) {
case SEQ_PADDING_INIT:
coder->pos = lzma_index_padding_size(coder->index);
coder->sequence = SEQ_PADDING;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_PADDING:
if (coder->pos > 0) {
*in_pos - in_start, coder->crc32);
coder->sequence = SEQ_CRC32;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_CRC32:
do {
}
coder->sequence = SEQ_UNPADDED;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_UNPADDED:
case SEQ_UNCOMPRESSED: {
*out_pos - out_start, coder->crc32);
coder->sequence = SEQ_CRC32;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_CRC32:
// We don't use the main loop, because we don't want
index_hash->pos = (LZMA_VLI_C(4) - index_size_unpadded(
index_hash->records.count,
index_hash->records.index_list_size)) & 3;
- index_hash->sequence = SEQ_PADDING;
- // Fall through
+ index_hash->sequence = SEQ_PADDING;
+ FALLTHROUGH;
case SEQ_PADDING:
if (index_hash->pos > 0) {
*in_pos - in_start, index_hash->crc32);
index_hash->sequence = SEQ_CRC32;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_CRC32:
do {
coder->member_size = sizeof(lzip_id_string);
coder->sequence = SEQ_VERSION;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_VERSION:
if (*in_pos >= in_size)
return LZMA_OK;
if (coder->tell_any_check)
return LZMA_GET_CHECK;
- // Fall through
+ FALLTHROUGH;
case SEQ_DICT_SIZE: {
if (*in_pos >= in_size)
// LZMA_MEMLIMIT_ERROR we need to be able to restart after
// the memlimit has been increased.
coder->sequence = SEQ_CODER_INIT;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_CODER_INIT: {
if (coder->memusage > coder->memlimit)
return LZMA_MEMLIMIT_ERROR;
coder->crc32 = 0;
coder->sequence = SEQ_LZMA_STREAM;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_LZMA_STREAM: {
const size_t in_start = *in_pos;
const size_t out_start = *out_pos;
return ret;
coder->sequence = SEQ_MEMBER_FOOTER;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_MEMBER_FOOTER: {
// The footer of .lz version 0 lacks the Member size field.
// This is the only difference between version 0 and
if (coder->tell_any_check)
return LZMA_GET_CHECK;
- }
- // Fall through
+ FALLTHROUGH;
+ }
case SEQ_BLOCK_HEADER: {
if (*in_pos >= in_size)
coder->pos = 0;
coder->sequence = SEQ_BLOCK_INIT;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_BLOCK_INIT: {
// Checking memusage and doing the initialization needs
// its own sequence point because we need to be able to
return ret;
coder->sequence = SEQ_BLOCK_RUN;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_BLOCK_RUN: {
const lzma_ret ret = coder->block_decoder.code(
coder->block_decoder.coder, allocator,
return ret;
coder->sequence = SEQ_STREAM_FOOTER;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_STREAM_FOOTER: {
// Copy the Stream Footer to the internal buffer.
lzma_bufcpy(in, in_pos, in_size, coder->buffer, &coder->pos,
return LZMA_STREAM_END;
coder->sequence = SEQ_STREAM_PADDING;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_STREAM_PADDING:
assert(coder->concatenated);
if (coder->tell_any_check)
return LZMA_GET_CHECK;
- }
- // Fall through
+ FALLTHROUGH;
+ }
case SEQ_BLOCK_HEADER: {
const size_t in_old = *in_pos;
}
coder->sequence = SEQ_BLOCK_INIT;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_BLOCK_INIT: {
// Check if decoding is possible at all with the current
// memlimit_stop which we must never exceed.
}
coder->sequence = SEQ_BLOCK_THR_INIT;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_BLOCK_THR_INIT: {
// We need to wait for a multiple conditions to become true
// until we can initialize the Block decoder and let a worker
}
coder->sequence = SEQ_BLOCK_THR_RUN;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_BLOCK_THR_RUN: {
if (action == LZMA_FINISH && coder->fail_fast) {
// We know that we won't get more input and that
coder->mem_direct_mode = coder->mem_next_filters;
coder->sequence = SEQ_BLOCK_DIRECT_RUN;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_BLOCK_DIRECT_RUN: {
const size_t in_old = *in_pos;
const size_t out_old = *out_pos;
return LZMA_OK;
coder->sequence = SEQ_INDEX_DECODE;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_INDEX_DECODE: {
// If we don't have any input, don't call
return ret;
coder->sequence = SEQ_STREAM_FOOTER;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_STREAM_FOOTER: {
// Copy the Stream Footer to the internal buffer.
const size_t in_old = *in_pos;
return LZMA_STREAM_END;
coder->sequence = SEQ_STREAM_PADDING;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_STREAM_PADDING:
assert(coder->concatenated);
coder->header_pos = 0;
coder->sequence = SEQ_BLOCK;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_BLOCK: {
// Initialized to silence warnings.
// to be ready to be copied out.
coder->progress_out += lzma_index_size(coder->index)
+ LZMA_STREAM_HEADER_SIZE;
- }
- // Fall through
+ FALLTHROUGH;
+ }
case SEQ_INDEX: {
// Call the Index encoder. It doesn't take any input, so
return LZMA_PROG_ERROR;
coder->sequence = SEQ_STREAM_FOOTER;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_STREAM_FOOTER:
lzma_bufcpy(coder->header, &coder->header_pos,
sizeof(coder->header),
coder->uncompressed_size = 0;
coder->compressed_size = 0;
coder->sequence = SEQ_LZMA_ENCODE;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_LZMA_ENCODE: {
// Calculate how much more uncompressed data this chunk
lzma2_header_lzma(coder);
coder->sequence = SEQ_LZMA_COPY;
+ FALLTHROUGH;
}
- // Fall through
-
case SEQ_LZMA_COPY:
// Copy the compressed chunk along its headers to the
// output buffer.
return LZMA_OK;
coder->sequence = SEQ_UNCOMPRESSED_COPY;
-
- // Fall through
+ FALLTHROUGH;
case SEQ_UNCOMPRESSED_COPY:
// Copy the uncompressed data as is from the dictionary
case OPT_FILES:
args->files_delim = '\n';
- // Fall through
+ FALLTHROUGH;
case OPT_FILES0:
if (args->files_name != NULL)
// If the above fails, the file is corrupt so
// LZMA_DATA_ERROR is a good error code.
-
- // Fall through
+ FALLTHROUGH;
case LZMA_DATA_ERROR:
// Free the memory allocated by lzma_block_header_decode().