From 52153d15cc17dacc0c5bf17ebd3c27ea80c0f9fd Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 3 Jan 2020 18:01:24 +0300 Subject: [PATCH] More strict aliasing --- dbms/src/Dictionaries/TrieDictionary.cpp | 2 +- dbms/src/Processors/Formats/Impl/ArrowColumnToCHColumn.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/Dictionaries/TrieDictionary.cpp b/dbms/src/Dictionaries/TrieDictionary.cpp index a16d30e32e9..1e2815e1a7a 100644 --- a/dbms/src/Dictionaries/TrieDictionary.cpp +++ b/dbms/src/Dictionaries/TrieDictionary.cpp @@ -660,7 +660,7 @@ void TrieDictionary::has(const Attribute &, const Columns & key_columns, PaddedP if (unlikely(addr.size != 16)) throw Exception("Expected key to be FixedString(16)", ErrorCodes::LOGICAL_ERROR); - uintptr_t slot = btrie_find_a6(trie, reinterpret_cast(addr.data)); + uintptr_t slot = btrie_find_a6(trie, reinterpret_cast(addr.data)); #pragma GCC diagnostic push #pragma GCC diagnostic warning "-Wold-style-cast" out[i] = (slot != BTRIE_NULL); diff --git a/dbms/src/Processors/Formats/Impl/ArrowColumnToCHColumn.cpp b/dbms/src/Processors/Formats/Impl/ArrowColumnToCHColumn.cpp index ed9c965a1f5..4e8772704e4 100644 --- a/dbms/src/Processors/Formats/Impl/ArrowColumnToCHColumn.cpp +++ b/dbms/src/Processors/Formats/Impl/ArrowColumnToCHColumn.cpp @@ -108,7 +108,7 @@ namespace DB { if (!chunk.IsNull(offset_i) && buffer) { - const UInt8 * raw_data = buffer->data() + chunk.value_offset(offset_i); + const auto * raw_data = buffer->data() + chunk.value_offset(offset_i); column_chars_t.insert_assume_reserved(raw_data, raw_data + chunk.value_length(offset_i)); } column_chars_t.emplace_back('\0');