fix build with clang-15

This commit is contained in:
Alexander Tokmakov 2022-08-01 18:00:54 +02:00
parent 31550436e4
commit 0d68b1c67f
13 changed files with 10 additions and 20 deletions

2
.gitmodules vendored
View File

@ -201,7 +201,7 @@
[submodule "contrib/boringssl"] [submodule "contrib/boringssl"]
path = contrib/boringssl path = contrib/boringssl
url = https://github.com/ClickHouse/boringssl.git url = https://github.com/ClickHouse/boringssl.git
branch = MergeWithUpstream branch = unknown_branch_from_artur
[submodule "contrib/NuRaft"] [submodule "contrib/NuRaft"]
path = contrib/NuRaft path = contrib/NuRaft
url = https://github.com/ClickHouse/NuRaft.git url = https://github.com/ClickHouse/NuRaft.git

2
contrib/boringssl vendored

@ -1 +1 @@
Subproject commit c1e01a441d6db234f4f12e63a7657d1f9e6db9c1 Subproject commit 8061ac62d67953e61b793042e33baf1352e67510

View File

@ -44,6 +44,8 @@
#define HAVE_SETJMP_H #define HAVE_SETJMP_H
#define HAVE_SYS_STAT_H #define HAVE_SYS_STAT_H
#define HAVE_UNISTD_H #define HAVE_UNISTD_H
#define HAVE_POLL_H
#define HAVE_PTHREAD_H
#define ENABLE_IPV6 #define ENABLE_IPV6
#define USE_OPENSSL #define USE_OPENSSL

2
contrib/krb5 vendored

@ -1 +1 @@
Subproject commit 5149dea4e2be0f67707383d2682b897c14631374 Subproject commit d879821c7a4c70b0c3ad739d9951d1a2b1903df7

2
contrib/nats-io vendored

@ -1 +1 @@
Subproject commit 6b2227f36757da090321e2d317569d2bd42c4cc1 Subproject commit 1e2597c54616015077e53a26d56b6bac448eb1b6

View File

@ -18,6 +18,8 @@ elseif(WIN32)
set(NATS_PLATFORM_INCLUDE "apple") set(NATS_PLATFORM_INCLUDE "apple")
endif() endif()
add_definitions(-DNATS_HAS_TLS)
file(GLOB PS_SOURCES "${NATS_IO_SOURCE_DIR}/${NATS_PLATFORM_INCLUDE}/*.c") file(GLOB PS_SOURCES "${NATS_IO_SOURCE_DIR}/${NATS_PLATFORM_INCLUDE}/*.c")
set(SRCS set(SRCS
"${NATS_IO_SOURCE_DIR}/asynccb.c" "${NATS_IO_SOURCE_DIR}/asynccb.c"

View File

@ -13,8 +13,6 @@ namespace fs = std::filesystem;
namespace DB namespace DB
{ {
constexpr decltype(ConfigReloader::reload_interval) ConfigReloader::reload_interval;
ConfigReloader::ConfigReloader( ConfigReloader::ConfigReloader(
const std::string & path_, const std::string & path_,
const std::string & include_from_path_, const std::string & include_from_path_,

View File

@ -131,7 +131,6 @@ void SlabsPolygonIndex::indexBuild(const std::vector<Polygon> & polygons)
/** Map of interesting edge ids to the index of left x, the index of right x */ /** Map of interesting edge ids to the index of left x, the index of right x */
std::vector<size_t> edge_left(m, n), edge_right(m, n); std::vector<size_t> edge_left(m, n), edge_right(m, n);
size_t total_index_edges = 0;
size_t edges_it = 0; size_t edges_it = 0;
for (size_t l = 0, r = 1; r < sorted_x.size(); ++l, ++r) for (size_t l = 0, r = 1; r < sorted_x.size(); ++l, ++r)
{ {
@ -170,12 +169,10 @@ void SlabsPolygonIndex::indexBuild(const std::vector<Polygon> & polygons)
if (l & 1) if (l & 1)
{ {
edges_index_tree[l++].emplace_back(all_edges[i]); edges_index_tree[l++].emplace_back(all_edges[i]);
++total_index_edges;
} }
if (r & 1) if (r & 1)
{ {
edges_index_tree[--r].emplace_back(all_edges[i]); edges_index_tree[--r].emplace_back(all_edges[i]);
++total_index_edges;
} }
} }
} }

View File

@ -229,7 +229,6 @@ bool needRewrite(ASTSelectQuery & select, std::vector<const ASTTableExpression *
return false; return false;
size_t num_array_join = 0; size_t num_array_join = 0;
size_t num_using = 0;
table_expressions.reserve(num_tables); table_expressions.reserve(num_tables);
for (size_t i = 0; i < num_tables; ++i) for (size_t i = 0; i < num_tables; ++i)
@ -256,9 +255,6 @@ bool needRewrite(ASTSelectQuery & select, std::vector<const ASTTableExpression *
const auto & join = table->table_join->as<ASTTableJoin &>(); const auto & join = table->table_join->as<ASTTableJoin &>();
if (join.kind == ASTTableJoin::Kind::Comma) if (join.kind == ASTTableJoin::Kind::Comma)
throw Exception("COMMA to CROSS JOIN rewriter is not enabled or cannot rewrite query", ErrorCodes::NOT_IMPLEMENTED); throw Exception("COMMA to CROSS JOIN rewriter is not enabled or cannot rewrite query", ErrorCodes::NOT_IMPLEMENTED);
if (join.using_expression_list)
++num_using;
} }
if (num_tables - num_array_join <= 2) if (num_tables - num_array_join <= 2)

View File

@ -162,9 +162,8 @@ void getProfileEvents(
dumpMemoryTracker(group_snapshot, columns, server_display_name); dumpMemoryTracker(group_snapshot, columns, server_display_name);
Block curr_block; Block curr_block;
size_t rows = 0;
for (; profile_queue->tryPop(curr_block); ++rows) while (profile_queue->tryPop(curr_block))
{ {
auto curr_columns = curr_block.getColumns(); auto curr_columns = curr_block.getColumns();
for (size_t j = 0; j < curr_columns.size(); ++j) for (size_t j = 0; j < curr_columns.size(); ++j)

View File

@ -182,12 +182,10 @@ void SessionLogElement::appendToBlock(MutableColumns & columns) const
auto & names_col = *settings_tuple_col.getColumnPtr(0)->assumeMutable(); auto & names_col = *settings_tuple_col.getColumnPtr(0)->assumeMutable();
auto & values_col = assert_cast<ColumnString &>(*settings_tuple_col.getColumnPtr(1)->assumeMutable()); auto & values_col = assert_cast<ColumnString &>(*settings_tuple_col.getColumnPtr(1)->assumeMutable());
size_t items_added = 0;
for (const auto & kv : settings) for (const auto & kv : settings)
{ {
names_col.insert(kv.first); names_col.insert(kv.first);
values_col.insert(kv.second); values_col.insert(kv.second);
++items_added;
} }
auto & offsets = settings_array_col.getOffsets(); auto & offsets = settings_array_col.getOffsets();

View File

@ -32,7 +32,7 @@ ASTIdentifier::ASTIdentifier(std::vector<String> && name_parts_, bool special, s
semantic->legacy_compound = true; semantic->legacy_compound = true;
if (!name_params.empty()) if (!name_params.empty())
{ {
size_t params = 0; [[maybe_unused]] size_t params = 0;
for (const auto & part [[maybe_unused]] : name_parts) for (const auto & part [[maybe_unused]] : name_parts)
{ {
if (part.empty()) if (part.empty())

View File

@ -282,11 +282,9 @@ void createConcurrent(zkutil::ZooKeeper & testzk, const std::string & zkhost, si
asyncs.push_back(std::async(std::launch::async, callback)); asyncs.push_back(std::async(std::launch::async, callback));
} }
size_t i = 0;
for (auto & async : asyncs) for (auto & async : asyncs)
{ {
async.wait(); async.wait();
i++;
} }
} }