diff --git a/dbms/src/Common/PODArray.h b/dbms/src/Common/PODArray.h index bb1d0b7d510..e8a0ce85be0 100644 --- a/dbms/src/Common/PODArray.h +++ b/dbms/src/Common/PODArray.h @@ -11,6 +11,7 @@ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant" +#pragma clang diagnostic ignored "-Wreserved-id-macro" #endif #include diff --git a/dbms/src/DataStreams/RemoteBlockInputStream.cpp b/dbms/src/DataStreams/RemoteBlockInputStream.cpp index 7b851ec8469..0aa129e264f 100644 --- a/dbms/src/DataStreams/RemoteBlockInputStream.cpp +++ b/dbms/src/DataStreams/RemoteBlockInputStream.cpp @@ -137,9 +137,9 @@ void RemoteBlockInputStream::sendExternalTables() for (const auto & table : external_tables) { StoragePtr cur = table.second; - QueryProcessingStage::Enum stage = QueryProcessingStage::Complete; + QueryProcessingStage::Enum read_from_table_stage = QueryProcessingStage::Complete; BlockInputStreams input = cur->read(cur->getColumns().getNamesOfPhysical(), {}, context, - stage, DEFAULT_BLOCK_SIZE, 1); + read_from_table_stage, DEFAULT_BLOCK_SIZE, 1); if (input.size() == 0) res.push_back(std::make_pair(std::make_shared(cur->getSampleBlock()), table.first)); else diff --git a/dbms/src/DataStreams/RemoteBlockOutputStream.cpp b/dbms/src/DataStreams/RemoteBlockOutputStream.cpp index 51fb62ef5a1..d9095ec91b9 100644 --- a/dbms/src/DataStreams/RemoteBlockOutputStream.cpp +++ b/dbms/src/DataStreams/RemoteBlockOutputStream.cpp @@ -52,7 +52,7 @@ void RemoteBlockOutputStream::write(const Block & block) { connection.sendData(block); } - catch (const NetException & e) + catch (const NetException &) { /// Try to get more detailed exception from server if (connection.poll(0)) diff --git a/dbms/src/Dictionaries/CatBoostModel.cpp b/dbms/src/Dictionaries/CatBoostModel.cpp index 0fc137ff35a..d36ec1ecae0 100644 --- a/dbms/src/Dictionaries/CatBoostModel.cpp +++ b/dbms/src/Dictionaries/CatBoostModel.cpp @@ -72,7 +72,6 @@ public: ~CatBoostModelHolder() { api->ModelCalcerDelete(handle); } CatBoostWrapperAPI::ModelCalcerHandle * get() { return handle; } - explicit operator CatBoostWrapperAPI::ModelCalcerHandle * () { return handle; } }; diff --git a/dbms/src/Dictionaries/DictionaryBlockInputStream.h b/dbms/src/Dictionaries/DictionaryBlockInputStream.h index 28459e1c067..24da102aeba 100644 --- a/dbms/src/Dictionaries/DictionaryBlockInputStream.h +++ b/dbms/src/Dictionaries/DictionaryBlockInputStream.h @@ -394,7 +394,7 @@ void DictionaryBlockInputStream::fillKeyColumns( ptr = column->deserializeAndInsertFromArena(ptr); } - for (size_t i = 0, size = columns.size(); i < size; ++i) + for (size_t i = 0, num_columns = columns.size(); i < num_columns; ++i) res.emplace_back(ColumnWithTypeAndName{ std::move(columns[i]), (*dictionary_structure.key)[i].type, (*dictionary_structure.key)[i].name }); } diff --git a/dbms/src/Dictionaries/TrieDictionary.cpp b/dbms/src/Dictionaries/TrieDictionary.cpp index 52227a6c1d4..6b664d4b448 100644 --- a/dbms/src/Dictionaries/TrieDictionary.cpp +++ b/dbms/src/Dictionaries/TrieDictionary.cpp @@ -569,7 +569,7 @@ void TrieDictionary::trieTraverse(const btrie_t * tree, Getter && getter) const if (node && node->right) { - stack.push(NULL); + stack.push(nullptr); key |= getBit(stack.size()); stack.push(node->right); while (stack.top()->left) diff --git a/dbms/src/IO/DoubleConverter.h b/dbms/src/IO/DoubleConverter.h index a76cdd9f388..f924cfea91f 100644 --- a/dbms/src/IO/DoubleConverter.h +++ b/dbms/src/IO/DoubleConverter.h @@ -1,7 +1,16 @@ #pragma once +#ifdef __clang__ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdouble-promotion" +#endif + #include +#ifdef __clang__ +#pragma clang diagnostic pop +#endif + namespace DB { diff --git a/dbms/src/Interpreters/Context.h b/dbms/src/Interpreters/Context.h index 81a4af4b8d1..f730a508e36 100644 --- a/dbms/src/Interpreters/Context.h +++ b/dbms/src/Interpreters/Context.h @@ -131,6 +131,7 @@ public: static Context createGlobal(std::shared_ptr runtime_components_factory); static Context createGlobal(); + Context(const Context &) = default; ~Context(); String getPath() const;