Skip to content

[lldb] Include guards missing for compression.h #112

@ggreif

Description

@ggreif

See:

#include <compression.h>

How it should be:

#if defined(HAVE_LIBCOMPRESSION)
#include <compression.h>
#endif

This was detected while updating the nixpkgs for llvm-10.

Similarly

case compression_types::zlib_deflate:
scratchbuf_size = compression_encode_scratch_buffer_size (COMPRESSION_ZLIB);
break;
case compression_types::lzma:
scratchbuf_size = compression_encode_scratch_buffer_size (COMPRESSION_LZMA);
break;
case compression_types::lzfse:
scratchbuf_size = compression_encode_scratch_buffer_size (COMPRESSION_LZFSE);
break;
default:
break;
}
if (scratchbuf_size > 0) {
g_libcompress_scratchbuf = (void*) malloc (scratchbuf_size);
g_libcompress_scratchbuf_type = compression_type;
}
}
if (compression_type == compression_types::lz4) {
compressed_size = compression_encode_buffer(
encoded_data.data(), encoded_data_buf_size,
(const uint8_t *)orig.c_str(), orig.size(),
g_libcompress_scratchbuf,
COMPRESSION_LZ4_RAW);
}
if (compression_type == compression_types::zlib_deflate) {
compressed_size = compression_encode_buffer(
encoded_data.data(), encoded_data_buf_size,
(const uint8_t *)orig.c_str(), orig.size(),
g_libcompress_scratchbuf,
COMPRESSION_ZLIB);
}
if (compression_type == compression_types::lzma) {
compressed_size = compression_encode_buffer(
encoded_data.data(), encoded_data_buf_size,
(const uint8_t *)orig.c_str(), orig.size(),
g_libcompress_scratchbuf,
COMPRESSION_LZMA);
}
if (compression_type == compression_types::lzfse) {
compressed_size = compression_encode_buffer(
encoded_data.data(), encoded_data_buf_size,
(const uint8_t *)orig.c_str(), orig.size(),
g_libcompress_scratchbuf,
COMPRESSION_LZFSE);
}

needs to be adapted.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions