Non significant changes according to clang's -Weverything, part 5 [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2018-06-04 01:11:50 +03:00
parent 7c60adbebb
commit 8cb65277e2
8 changed files with 16 additions and 6 deletions

View File

@ -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 <boost/noncopyable.hpp>

View File

@ -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<OneBlockInputStream>(cur->getSampleBlock()), table.first));
else

View File

@ -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))

View File

@ -72,7 +72,6 @@ public:
~CatBoostModelHolder() { api->ModelCalcerDelete(handle); }
CatBoostWrapperAPI::ModelCalcerHandle * get() { return handle; }
explicit operator CatBoostWrapperAPI::ModelCalcerHandle * () { return handle; }
};

View File

@ -394,7 +394,7 @@ void DictionaryBlockInputStream<DictionaryType, Key>::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 });
}

View File

@ -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)

View File

@ -1,7 +1,16 @@
#pragma once
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdouble-promotion"
#endif
#include <double-conversion/double-conversion.h>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
namespace DB
{

View File

@ -131,6 +131,7 @@ public:
static Context createGlobal(std::shared_ptr<IRuntimeComponentsFactory> runtime_components_factory);
static Context createGlobal();
Context(const Context &) = default;
~Context();
String getPath() const;