mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Address review comments
This commit is contained in:
parent
f34ef716f0
commit
e6134bbb7b
@ -23,7 +23,7 @@ class LibArchiveReader::StreamInfo
|
||||
public:
|
||||
explicit StreamInfo(std::unique_ptr<SeekableReadBuffer> read_buffer_) : read_buffer(std::move(read_buffer_)) { }
|
||||
|
||||
static ssize_t read([[maybe_unused]] struct archive * a, void * client_data, const void ** buff)
|
||||
static ssize_t read(struct archive *, void * client_data, const void ** buff)
|
||||
{
|
||||
auto * read_stream = reinterpret_cast<StreamInfo *>(client_data);
|
||||
*buff = reinterpret_cast<void *>(read_stream->buf);
|
||||
|
@ -34,7 +34,7 @@ class LibArchiveWriter::StreamInfo
|
||||
{
|
||||
public:
|
||||
explicit StreamInfo(std::unique_ptr<WriteBuffer> archive_write_buffer_) : archive_write_buffer(std::move(archive_write_buffer_)) { }
|
||||
static ssize_t memory_write([[maybe_unused]] struct archive * archive, void * client_data, const void * buff, size_t length)
|
||||
static ssize_t memory_write(struct archive *, void * client_data, const void * buff, size_t length)
|
||||
{
|
||||
auto * stream_info = reinterpret_cast<StreamInfo *>(client_data);
|
||||
stream_info->archive_write_buffer->write(reinterpret_cast<const char *>(buff), length);
|
||||
|
@ -34,7 +34,6 @@ createArchiveWriter(const String & path_to_archive, [[maybe_unused]] std::unique
|
||||
throw Exception(ErrorCodes::SUPPORT_IS_DISABLED, "minizip library is disabled");
|
||||
#endif
|
||||
}
|
||||
//todo add support for extentsions i.e .gz
|
||||
else if (std::any_of(
|
||||
tar_extensions.begin(), tar_extensions.end(), [&](const auto extension) { return path_to_archive.ends_with(extension); }))
|
||||
{
|
||||
@ -47,5 +46,4 @@ createArchiveWriter(const String & path_to_archive, [[maybe_unused]] std::unique
|
||||
else
|
||||
throw Exception(ErrorCodes::CANNOT_PACK_ARCHIVE, "Cannot determine the type of archive {}", path_to_archive);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user