1
0
Fork 0

fixing various warnings (#5013)

This commit is contained in:
Simon 2018-04-05 17:01:16 +02:00 committed by Jan
parent dd88e3b09a
commit 9980067e73
13 changed files with 22 additions and 23 deletions

View File

@ -118,9 +118,9 @@ iresearch::index_file_refs::ref_t load_newest_index_meta(
break; // try the next codec break; // try the next codec
} }
ref = std::move(iresearch::directory_utils::reference( ref = iresearch::directory_utils::reference(
const_cast<iresearch::directory&>(dir), filename const_cast<iresearch::directory&>(dir), filename
)); );
} }
std::time_t mtime; std::time_t mtime;

View File

@ -102,7 +102,7 @@ void index_writer::flush_context::reset() {
modification_queries_.clear(); modification_queries_.clear();
pending_segments_.clear(); pending_segments_.clear();
segment_mask_.clear(); segment_mask_.clear();
writers_pool_.visit([this](segment_writer& writer)->bool { writers_pool_.visit([](segment_writer& writer)->bool {
writer.reset(); writer.reset();
return true; return true;
}); });

View File

@ -217,7 +217,7 @@ void order::prepared::scorers::score(
size_t i = 0; size_t i = 0;
std::for_each( std::for_each(
scorers_.begin(), scorers_.end(), scorers_.begin(), scorers_.end(),
[this, &ord, &scr, &i] (const sort::scorer::ptr& scorer) { [&ord, &scr, &i] (const sort::scorer::ptr& scorer) {
if (scorer) scorer->score(scr); if (scorer) scorer->score(scr);
const sort::prepared& bucket = *ord[i++].bucket; const sort::prepared& bucket = *ord[i++].bucket;
scr += bucket.size(); scr += bucket.size();

View File

@ -54,7 +54,7 @@ std::vector<bucket_size_t> compute_bucket_meta() {
std::vector<bucket_size_t> bucket_meta(num_buckets); std::vector<bucket_size_t> bucket_meta(num_buckets);
if (!num_buckets) { if (!num_buckets) {
return std::move(bucket_meta); return bucket_meta;
} }
bucket_meta[0].size = 1 << skip_bits; bucket_meta[0].size = 1 << skip_bits;
@ -69,7 +69,7 @@ std::vector<bucket_size_t> compute_bucket_meta() {
// all subsequent buckets should have the same meta as the last bucket // all subsequent buckets should have the same meta as the last bucket
bucket_meta.back().next = &(bucket_meta.back()); bucket_meta.back().next = &(bucket_meta.back());
return std::move(bucket_meta); return bucket_meta;
} }
MSVC_ONLY(__pragma(warning(pop))) MSVC_ONLY(__pragma(warning(pop)))

View File

@ -456,7 +456,7 @@ bool stack_trace_libunwind(iresearch::logger::level_t level); // predeclaration
auto fn_end = offset_start ? offset_start - 1 : nullptr; auto fn_end = offset_start ? offset_start - 1 : nullptr;
auto path_end = fn_start ? fn_start - 1 : (addr_start ? addr_start - 1 : nullptr); auto path_end = fn_start ? fn_start - 1 : (addr_start ? addr_start - 1 : nullptr);
bfd_callback_type_t callback = [level, out](const char* file, size_t line, const char* fn)->void { bfd_callback_type_t callback = [out](const char* file, size_t line, const char* fn)->void {
UNUSED(fn); UNUSED(fn);
if (file) { if (file) {

View File

@ -317,7 +317,7 @@ static inline void clearAttributeAccess(
Condition::Condition(Ast* ast) Condition::Condition(Ast* ast)
: _ast(ast), _root(nullptr), _isNormalized(false), _isSorted(false) {} : _ast(ast), _root(nullptr), _isNormalized(false), _isSorted(false) {}
namespace { /*namespace {
size_t countNodes(AstNode* node) { size_t countNodes(AstNode* node) {
if (node == nullptr) { if (node == nullptr) {
return 0; return 0;
@ -331,7 +331,7 @@ Condition::Condition(Ast* ast)
return sum; return sum;
} }
} }*/
/// @brief destroy the condition /// @brief destroy the condition
Condition::~Condition() { Condition::~Condition() {

View File

@ -3089,7 +3089,6 @@ void arangodb::aql::collectInClusterRule(Optimizer* opt,
for (auto& node : nodes) { for (auto& node : nodes) {
// found a node we need to replace in the plan // found a node we need to replace in the plan
auto const& parents = node->getParents();
auto const& deps = node->getDependencies(); auto const& deps = node->getDependencies();
TRI_ASSERT(deps.size() == 1); TRI_ASSERT(deps.size() == 1);

View File

@ -1687,7 +1687,7 @@ NS_BEGIN(iresearch)
.field(DocumentPrimaryKey::CID()) // set field .field(DocumentPrimaryKey::CID()) // set field
.term(DocumentPrimaryKey::encode(cid)); // set value .term(DocumentPrimaryKey::encode(cid)); // set value
return std::move(filter); return filter;
} }
/*static*/ irs::filter::ptr FilterFactory::filter( /*static*/ irs::filter::ptr FilterFactory::filter(
@ -1698,7 +1698,7 @@ NS_BEGIN(iresearch)
FilterFactory::filter(static_cast<irs::And&>(*filter), cid, rid); FilterFactory::filter(static_cast<irs::And&>(*filter), cid, rid);
return std::move(filter); return filter;
} }
/*static*/ irs::filter& FilterFactory::filter( /*static*/ irs::filter& FilterFactory::filter(

View File

@ -54,7 +54,7 @@ class IResearchViewCoordinator final: public arangodb::LogicalView {
void drop() override { } void drop() override { }
virtual Result rename(std::string&& newName, bool doSync) { virtual Result rename(std::string&& newName, bool doSync) override {
return { TRI_ERROR_NOT_IMPLEMENTED }; return { TRI_ERROR_NOT_IMPLEMENTED };
} }
@ -62,7 +62,7 @@ class IResearchViewCoordinator final: public arangodb::LogicalView {
arangodb::velocypack::Builder& result, arangodb::velocypack::Builder& result,
bool includeProperties = false, bool includeProperties = false,
bool includeSystem = false bool includeSystem = false
) const { ) const override {
// FIXME: implement // FIXME: implement
} }
@ -70,7 +70,7 @@ class IResearchViewCoordinator final: public arangodb::LogicalView {
arangodb::velocypack::Slice const& properties, arangodb::velocypack::Slice const& properties,
bool partialUpdate, bool partialUpdate,
bool doSync bool doSync
) { ) override {
return { TRI_ERROR_NOT_IMPLEMENTED }; return { TRI_ERROR_NOT_IMPLEMENTED };
} }
}; // IResearchViewCoordinator }; // IResearchViewCoordinator

View File

@ -63,12 +63,12 @@ class FakeResponse : public GeneralResponse {
void addPayload(VPackSlice const&, void addPayload(VPackSlice const&,
arangodb::velocypack::Options const* = nullptr, arangodb::velocypack::Options const* = nullptr,
bool resolveExternals = true) { bool resolveExternals = true) override {
// TODO // TODO
}; };
void addPayload(VPackBuffer<uint8_t>&&, void addPayload(VPackBuffer<uint8_t>&&,
arangodb::velocypack::Options const* = nullptr, arangodb::velocypack::Options const* = nullptr,
bool resolveExternals = true) { bool resolveExternals = true) override {
// TODO // TODO
}; };

View File

@ -56,7 +56,7 @@ std::unique_ptr<arangodb::LogicalView> makeTestView(
) const override { ) const override {
} }
virtual void open() override {} virtual void open() override {}
virtual arangodb::Result rename(std::string&& newName, bool doSync) { virtual arangodb::Result rename(std::string&& newName, bool doSync) override {
return {}; return {};
} }
virtual arangodb::Result updateProperties( virtual arangodb::Result updateProperties(

View File

@ -57,7 +57,7 @@ std::unique_ptr<arangodb::LogicalView> makeTestView(
) const override { ) const override {
} }
virtual void open() override {} virtual void open() override {}
virtual arangodb::Result rename(std::string&& newName, bool doSync) { virtual arangodb::Result rename(std::string&& newName, bool doSync) override {
return {}; return {};
} }
virtual arangodb::Result updateProperties( virtual arangodb::Result updateProperties(