aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-02-08 15:03:19 +0100
committerTor Egge <Tor.Egge@broadpark.no>2019-02-08 15:03:19 +0100
commita276d7747b75819e1f0dd9f8793d267d65c16bf8 (patch)
tree43a981dc16eca4c045fe2a258882d0f0d0e7be6f
parentc4217d0b9a00af2bb3fb08f32df1651ed9c91c9f (diff)
Eliminate some clang warnings in searchlib
-rw-r--r--searchlib/src/apps/vespa-index-inspect/vespa-index-inspect.cpp1
-rw-r--r--searchlib/src/tests/attribute/enumeratedsave/enumeratedsave_test.cpp11
-rw-r--r--searchlib/src/tests/predicate/predicate_index_test.cpp1
-rw-r--r--searchlib/src/tests/predicate/predicate_zero_constraint_posting_list_test.cpp1
-rw-r--r--searchlib/src/tests/transactionlog/translogclient_test.cpp2
-rw-r--r--searchlib/src/tests/transactionlogstress/translogstress.cpp1
-rw-r--r--searchlib/src/tests/util/bufferwriter/bufferwriter_test.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/aggregation/group.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attribute_header.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/attribute/attribute_header.h1
-rw-r--r--searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/stringbase.h2
-rw-r--r--searchlib/src/vespa/searchlib/btree/btreeinserter.hpp4
-rw-r--r--searchlib/src/vespa/searchlib/btree/btreenode.hpp1
-rw-r--r--searchlib/src/vespa/searchlib/docstore/chunk.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/docstore/chunk.h1
-rw-r--r--searchlib/src/vespa/searchlib/docstore/chunkformat.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/docstore/logdatastore.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/expression/stringresultnode.h3
-rw-r--r--searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/features/fieldinfofeature.h1
-rw-r--r--searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/features/fieldmatchfeature.h1
-rw-r--r--searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h1
-rw-r--r--searchlib/src/vespa/searchlib/features/termdistancefeature.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/features/termdistancefeature.h1
-rw-r--r--searchlib/src/vespa/searchlib/fef/termfieldmatchdataposition.h3
-rw-r--r--searchlib/src/vespa/searchlib/fef/test/ftlib.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/parsequery/simplequerystack.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/query/queryterm.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/monitoring_search_iterator.h1
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/predicate_search.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/queryeval/predicate_search.h1
-rw-r--r--searchlib/src/vespa/searchlib/tensor/tensor_store.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/test/fakedata/fakeegcompr64filterocc.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/test/fakedata/fakezcbfilterocc.cpp12
-rw-r--r--searchlib/src/vespa/searchlib/test/fakedata/fakezcbfilterocc.h1
-rw-r--r--searchlib/src/vespa/searchlib/test/imported_attribute_fixture.h8
41 files changed, 32 insertions, 73 deletions
diff --git a/searchlib/src/apps/vespa-index-inspect/vespa-index-inspect.cpp b/searchlib/src/apps/vespa-index-inspect/vespa-index-inspect.cpp
index a746c6c1365..6522d814529 100644
--- a/searchlib/src/apps/vespa-index-inspect/vespa-index-inspect.cpp
+++ b/searchlib/src/apps/vespa-index-inspect/vespa-index-inspect.cpp
@@ -679,7 +679,6 @@ class DumpWordsSubApp : public SubApp
FieldOptions _fieldOptions;
uint64_t _minNumDocs;
bool _verbose;
- bool _all;
bool _showWordNum;
public:
diff --git a/searchlib/src/tests/attribute/enumeratedsave/enumeratedsave_test.cpp b/searchlib/src/tests/attribute/enumeratedsave/enumeratedsave_test.cpp
index 432396d635e..9ede6e63c2e 100644
--- a/searchlib/src/tests/attribute/enumeratedsave/enumeratedsave_test.cpp
+++ b/searchlib/src/tests/attribute/enumeratedsave/enumeratedsave_test.cpp
@@ -370,17 +370,6 @@ equalsHelper(const T &lhs, const T &rhs)
template <>
inline bool
-equalsHelper<float>(const float &lhs, const float &rhs)
-{
- if (std::isnan(lhs))
- return std::isnan(rhs);
- if (std::isnan(rhs))
- return false;
- return lhs == rhs;
-}
-
-template <>
-inline bool
equalsHelper<double>(const double &lhs, const double &rhs)
{
if (std::isnan(lhs))
diff --git a/searchlib/src/tests/predicate/predicate_index_test.cpp b/searchlib/src/tests/predicate/predicate_index_test.cpp
index 6d74e6c7343..78827c96d2f 100644
--- a/searchlib/src/tests/predicate/predicate_index_test.cpp
+++ b/searchlib/src/tests/predicate/predicate_index_test.cpp
@@ -100,7 +100,6 @@ lookupPosting(const PredicateIndex &index, uint64_t hash) {
}
const int min_feature = 3;
-const int k = min_feature - 1;
const uint32_t doc_id = 2;
const uint64_t hash = 0x12345;
const uint64_t hash2 = 0x3456;
diff --git a/searchlib/src/tests/predicate/predicate_zero_constraint_posting_list_test.cpp b/searchlib/src/tests/predicate/predicate_zero_constraint_posting_list_test.cpp
index 2d8f13a3a4c..e427c99c007 100644
--- a/searchlib/src/tests/predicate/predicate_zero_constraint_posting_list_test.cpp
+++ b/searchlib/src/tests/predicate/predicate_zero_constraint_posting_list_test.cpp
@@ -23,7 +23,6 @@ vespalib::GenerationHandler generation_handler;
vespalib::GenerationHolder generation_holder;
DummyDocIdLimitProvider limit_provider;
SimpleIndexConfig config;
-const uint64_t hash = 0x123;
TEST("require that empty posting list starts at 0.") {
PredicateIndex index(generation_handler, generation_holder, limit_provider, config, 8);
diff --git a/searchlib/src/tests/transactionlog/translogclient_test.cpp b/searchlib/src/tests/transactionlog/translogclient_test.cpp
index 861023b79b7..8a515f749f1 100644
--- a/searchlib/src/tests/transactionlog/translogclient_test.cpp
+++ b/searchlib/src/tests/transactionlog/translogclient_test.cpp
@@ -108,7 +108,7 @@ RPC::Result CallBackManyTest::receive(const Packet & p)
Packet::Entry e;
e.deserialize(h);
assert(e.data().size() == 8);
- size_t v = *(const size_t*) e.data().c_str();
+ size_t v = *(const size_t*) (const void *)e.data().c_str();
assert(_count+1 == e.serial());
assert(v == _value);
(void) v;
diff --git a/searchlib/src/tests/transactionlogstress/translogstress.cpp b/searchlib/src/tests/transactionlogstress/translogstress.cpp
index 7a7bc410371..095cc29984b 100644
--- a/searchlib/src/tests/transactionlogstress/translogstress.cpp
+++ b/searchlib/src/tests/transactionlogstress/translogstress.cpp
@@ -325,7 +325,6 @@ private:
SerialNum _from;
SerialNum _to;
SerialNum _next;
- bool _running;
State _state;
Monitor _monitor;
diff --git a/searchlib/src/tests/util/bufferwriter/bufferwriter_test.cpp b/searchlib/src/tests/util/bufferwriter/bufferwriter_test.cpp
index 0ae9264ec06..1830d25fc72 100644
--- a/searchlib/src/tests/util/bufferwriter/bufferwriter_test.cpp
+++ b/searchlib/src/tests/util/bufferwriter/bufferwriter_test.cpp
@@ -74,7 +74,7 @@ StoreBufferWriter::getSingleBuffer() const
for (const auto &buf : _bufs) {
res.insert(res.end(), buf->cbegin(), buf->cend());
}
- return std::move(res);
+ return res;
}
}
diff --git a/searchlib/src/vespa/searchlib/aggregation/group.cpp b/searchlib/src/vespa/searchlib/aggregation/group.cpp
index 17e56c9af21..1808af79b4d 100644
--- a/searchlib/src/vespa/searchlib/aggregation/group.cpp
+++ b/searchlib/src/vespa/searchlib/aggregation/group.cpp
@@ -709,7 +709,7 @@ Group::Value::operator =(const Value & rhs) {
return *this;
}
-Group::Value::~Value()
+Group::Value::~Value() noexcept
{
destruct(_children, getAllChildrenSize());
setChildrenSize(0);
diff --git a/searchlib/src/vespa/searchlib/attribute/attribute_header.cpp b/searchlib/src/vespa/searchlib/attribute/attribute_header.cpp
index b47090bfc97..224d5758028 100644
--- a/searchlib/src/vespa/searchlib/attribute/attribute_header.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/attribute_header.cpp
@@ -31,7 +31,6 @@ AttributeHeader::AttributeHeader()
_predicateParamsSet(false),
_predicateParams(),
_numDocs(0),
- _fixedWidth(0),
_uniqueValueCount(0),
_totalValueCount(0),
_createSerialNum(0u),
@@ -42,7 +41,7 @@ AttributeHeader::AttributeHeader()
AttributeHeader::AttributeHeader(const vespalib::string &fileName, attribute::BasicType basicType,
attribute::CollectionType collectionType, const vespalib::eval::ValueType &tensorType,
bool enumerated, const attribute::PersistentPredicateParams &predicateParams,
- uint32_t numDocs, uint32_t fixedWidth, uint64_t uniqueValueCount,
+ uint32_t numDocs, [[maybe_unused]] uint32_t fixedWidth, uint64_t uniqueValueCount,
uint64_t totalValueCount, uint64_t createSerialNum, uint32_t version)
: _fileName(fileName),
_basicType(basicType),
@@ -53,7 +52,6 @@ AttributeHeader::AttributeHeader(const vespalib::string &fileName, attribute::Ba
_predicateParamsSet(false),
_predicateParams(predicateParams),
_numDocs(numDocs),
- _fixedWidth(fixedWidth),
_uniqueValueCount(uniqueValueCount),
_totalValueCount(totalValueCount),
_createSerialNum(createSerialNum),
diff --git a/searchlib/src/vespa/searchlib/attribute/attribute_header.h b/searchlib/src/vespa/searchlib/attribute/attribute_header.h
index a364b512d25..303c469e755 100644
--- a/searchlib/src/vespa/searchlib/attribute/attribute_header.h
+++ b/searchlib/src/vespa/searchlib/attribute/attribute_header.h
@@ -27,7 +27,6 @@ private:
bool _predicateParamsSet;
PersistentPredicateParams _predicateParams;
uint32_t _numDocs;
- uint32_t _fixedWidth;
uint64_t _uniqueValueCount;
uint64_t _totalValueCount;
uint64_t _createSerialNum;
diff --git a/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.cpp b/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.cpp
index e9743e3e86d..a90badb10b2 100644
--- a/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.cpp
@@ -8,7 +8,7 @@ namespace search {
using largeint_t = attribute::IAttributeVector::largeint_t;
using SearchContext = AttributeVector::SearchContext;
-[[noreturn]] void
+void
NotImplementedAttribute::notImplemented() const {
throw vespalib::IllegalStateException("The function is not implemented.");
}
diff --git a/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.h b/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.h
index 4552a24ec2e..a5b570a4864 100644
--- a/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.h
+++ b/searchlib/src/vespa/searchlib/attribute/not_implemented_attribute.h
@@ -9,7 +9,7 @@ namespace search {
struct NotImplementedAttribute : AttributeVector {
using AttributeVector::AttributeVector;
- virtual void notImplemented() const ;
+ [[noreturn]] virtual void notImplemented() const ;
uint32_t getValueCount(DocId) const override;
largeint_t getInt(DocId) const override;
diff --git a/searchlib/src/vespa/searchlib/attribute/stringbase.h b/searchlib/src/vespa/searchlib/attribute/stringbase.h
index 593d8f048f9..11952675c00 100644
--- a/searchlib/src/vespa/searchlib/attribute/stringbase.h
+++ b/searchlib/src/vespa/searchlib/attribute/stringbase.h
@@ -94,6 +94,7 @@ private:
template <typename T>
void loadAllAtOnce(T & loaded, LoadedBufferUP dataBuffer, uint32_t numDocs, ReaderBase & attrReader, bool hasWeight, bool hasIdx);
+protected:
class StringSearchContext : public SearchContext {
public:
StringSearchContext(QueryTermSimpleUP qTerm, const StringAttribute & toBeSearched);
@@ -178,6 +179,7 @@ private:
mutable WeightedConstChar * _buffer;
std::unique_ptr<vespalib::Regexp> _regex;
};
+private:
SearchContext::UP getSearch(QueryTermSimpleUP term, const attribute::SearchContextParams & params) const override;
};
diff --git a/searchlib/src/vespa/searchlib/btree/btreeinserter.hpp b/searchlib/src/vespa/searchlib/btree/btreeinserter.hpp
index d95579abe9c..d1da94c1b17 100644
--- a/searchlib/src/vespa/searchlib/btree/btreeinserter.hpp
+++ b/searchlib/src/vespa/searchlib/btree/btreeinserter.hpp
@@ -41,11 +41,11 @@ BTreeInserter<KeyT, DataT, AggrT, CompareT, TraitsT, AggrCalcT>::rebalanceLeafEn
LeafNodeType *rightNode = nullptr;
if (parentIdx > 0) {
leftRef = parentNode->getChild(parentIdx - 1);
- leftNode = allocator.template mapLeafRef(leftRef);
+ leftNode = allocator.mapLeafRef(leftRef);
}
if (parentIdx + 1 < parentNode->validSlots()) {
rightRef = parentNode->getChild(parentIdx + 1);
- rightNode = allocator.template mapLeafRef(rightRef);
+ rightNode = allocator.mapLeafRef(rightRef);
}
if (leftNode != nullptr && leftNode->validSlots() < LeafNodeType::maxSlots() &&
(rightNode == nullptr || leftNode->validSlots() < rightNode->validSlots())) {
diff --git a/searchlib/src/vespa/searchlib/btree/btreenode.hpp b/searchlib/src/vespa/searchlib/btree/btreenode.hpp
index dbf926a302c..421e83a8440 100644
--- a/searchlib/src/vespa/searchlib/btree/btreenode.hpp
+++ b/searchlib/src/vespa/searchlib/btree/btreenode.hpp
@@ -81,6 +81,7 @@ BTreeNodeTT<KeyT, DataT, AggrT, NumSlots>::insert(uint32_t idx,
assert(validSlots() < NodeType::maxSlots());
assert(!getFrozen());
for (uint32_t i = validSlots(); i > idx; --i) {
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds" // This dirty one is due a suspected bug in gcc 6.2
_keys[i] = _keys[i - 1];
#pragma GCC diagnostic pop
diff --git a/searchlib/src/vespa/searchlib/docstore/chunk.cpp b/searchlib/src/vespa/searchlib/docstore/chunk.cpp
index ba467501fba..e8ca31d6dfb 100644
--- a/searchlib/src/vespa/searchlib/docstore/chunk.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/chunk.cpp
@@ -56,7 +56,6 @@ Chunk::pack(uint64_t lastSerial, vespalib::DataBuffer & compressed, const Compre
Chunk::Chunk(uint32_t id, const Config & config) :
_id(id),
- _nextOffset(0),
_lastSerial(static_cast<uint64_t>(-1l)),
_format(new ChunkFormatV2(config.getMaxBytes()))
{
@@ -65,7 +64,6 @@ Chunk::Chunk(uint32_t id, const Config & config) :
Chunk::Chunk(uint32_t id, const void * buffer, size_t len, bool skipcrc) :
_id(id),
- _nextOffset(0),
_lastSerial(static_cast<uint64_t>(-1l)),
_format(ChunkFormat::deserialize(buffer, len, skipcrc))
{
diff --git a/searchlib/src/vespa/searchlib/docstore/chunk.h b/searchlib/src/vespa/searchlib/docstore/chunk.h
index cd551de1a9e..58bdf1d7359 100644
--- a/searchlib/src/vespa/searchlib/docstore/chunk.h
+++ b/searchlib/src/vespa/searchlib/docstore/chunk.h
@@ -107,7 +107,6 @@ private:
vespalib::nbostream & getData();
uint32_t _id;
- uint32_t _nextOffset;
uint64_t _lastSerial;
std::unique_ptr<ChunkFormat> _format;
LidList _lids;
diff --git a/searchlib/src/vespa/searchlib/docstore/chunkformat.cpp b/searchlib/src/vespa/searchlib/docstore/chunkformat.cpp
index 0f360d99247..4d76b3fea25 100644
--- a/searchlib/src/vespa/searchlib/docstore/chunkformat.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/chunkformat.cpp
@@ -49,7 +49,7 @@ size_t
ChunkFormat::getMaxPackSize(const CompressionConfig & compression) const
{
const size_t OVERHEAD(0);
- const size_t MINSIZE(1 + 1 + 4 + 4 + includeSerializedSize() ? 4 : 0); // version + type + real length + crc + lastserial
+ const size_t MINSIZE(1 + 1 + 4 + 4 + (includeSerializedSize() ? 4 : 0)); // version + type + real length + crc + lastserial
const size_t formatSpecificSize(getHeaderSize());
size_t rawSize(MINSIZE + formatSpecificSize + OVERHEAD);
const size_t payloadSize(_dataBuf.size() + 8);
diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
index 590764bf469..ac874911b27 100644
--- a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
@@ -863,7 +863,7 @@ LogDataStore::eraseIncompleteCompactedFiles(NameIdSet partList)
FileChunk::eraseDatFile(name);
}
- return std::move(partList);
+ return partList;
}
void
@@ -1183,7 +1183,7 @@ LogDataStore::getFileChunkStats() const
}
}
std::sort(result.begin(), result.end());
- return std::move(result);
+ return result;
}
void
diff --git a/searchlib/src/vespa/searchlib/expression/stringresultnode.h b/searchlib/src/vespa/searchlib/expression/stringresultnode.h
index 2e8ddd57d94..cbe81e95eba 100644
--- a/searchlib/src/vespa/searchlib/expression/stringresultnode.h
+++ b/searchlib/src/vespa/searchlib/expression/stringresultnode.h
@@ -35,7 +35,8 @@ private:
new (buf) vespalib::string();
}
void destroy(void * buf) const override {
- static_cast<vespalib::string *>(buf)->vespalib::string::~string();
+ using string = vespalib::string;
+ static_cast<string *>(buf)->string::~string();
}
void decode(const void * buf) override {
diff --git a/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp b/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp
index 960dcc7dfd1..d7e17187ff4 100644
--- a/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/fieldinfofeature.cpp
@@ -15,11 +15,10 @@ namespace search {
namespace features {
IndexFieldInfoExecutor::IndexFieldInfoExecutor(feature_t type, feature_t isFilter,
- uint32_t field, uint32_t fieldHandle)
+ [[maybe_unused]] uint32_t field, uint32_t fieldHandle)
: fef::FeatureExecutor(),
_type(type),
_isFilter(isFilter),
- _field(field),
_fieldHandle(fieldHandle),
_md(nullptr)
{
diff --git a/searchlib/src/vespa/searchlib/features/fieldinfofeature.h b/searchlib/src/vespa/searchlib/features/fieldinfofeature.h
index f8d45d83af6..2be2bad1e4a 100644
--- a/searchlib/src/vespa/searchlib/features/fieldinfofeature.h
+++ b/searchlib/src/vespa/searchlib/features/fieldinfofeature.h
@@ -11,7 +11,6 @@ class IndexFieldInfoExecutor : public fef::FeatureExecutor
private:
feature_t _type; // from index env
feature_t _isFilter; // from index env
- uint32_t _field;
uint32_t _fieldHandle;
const fef::MatchData *_md;
diff --git a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp
index f5f8652461e..583afa6e698 100644
--- a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.cpp
@@ -15,11 +15,10 @@ namespace search::features {
FieldMatchExecutor::FieldMatchExecutor(const IQueryEnvironment & queryEnv,
const FieldInfo & field,
- const fieldmatch::Params & params) :
+ [[maybe_unused]] const fieldmatch::Params & params) :
FeatureExecutor(),
_splitter(queryEnv, field.id()),
_field(field),
- _params(params),
_cmp(vespalib::make_string("fieldMatch(%s)", _field.name().c_str()),
_splitter, field, params)
{
diff --git a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h
index 1f21364b294..0cc1c8649d1 100644
--- a/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h
+++ b/searchlib/src/vespa/searchlib/features/fieldmatchfeature.h
@@ -15,7 +15,6 @@ class FieldMatchExecutor : public fef::FeatureExecutor {
private:
fef::PhraseSplitter _splitter;
const fef::FieldInfo & _field;
- const fieldmatch::Params & _params;
fieldmatch::Computer _cmp;
void handle_bind_match_data(const fef::MatchData &md) override;
diff --git a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp
index 84ad17e1cb0..089a8102d6e 100644
--- a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.cpp
@@ -43,7 +43,6 @@ NativeFieldMatchExecutor::NativeFieldMatchExecutor(const IQueryEnvironment & env
FeatureExecutor(),
_params(params),
_queryTerms(),
- _totalTermWeight(0),
_divisor(0),
_md(nullptr)
{
diff --git a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h
index 539b64ced16..6b627b84720 100644
--- a/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h
+++ b/searchlib/src/vespa/searchlib/features/nativefieldmatchfeature.h
@@ -47,7 +47,6 @@ private:
};
const NativeFieldMatchParams & _params;
std::vector<MyQueryTerm> _queryTerms;
- uint32_t _totalTermWeight;
feature_t _divisor;
const fef::MatchData *_md;
diff --git a/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp b/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp
index 0408f6d4b75..fb38a49d6eb 100644
--- a/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp
+++ b/searchlib/src/vespa/searchlib/features/termdistancefeature.cpp
@@ -13,9 +13,8 @@ namespace features {
TermDistanceExecutor::TermDistanceExecutor(const IQueryEnvironment & env,
- const TermDistanceParams & params) :
+ [[maybe_unused]] const TermDistanceParams & params) :
FeatureExecutor(),
- _params(params),
_termA(env.getTerm(params.termX)),
_termB(env.getTerm(params.termY)),
_md(nullptr)
diff --git a/searchlib/src/vespa/searchlib/features/termdistancefeature.h b/searchlib/src/vespa/searchlib/features/termdistancefeature.h
index 276476de21b..bd234589ff8 100644
--- a/searchlib/src/vespa/searchlib/features/termdistancefeature.h
+++ b/searchlib/src/vespa/searchlib/features/termdistancefeature.h
@@ -24,7 +24,6 @@ struct TermDistanceParams {
class TermDistanceExecutor : public fef::FeatureExecutor
{
private:
- const TermDistanceParams & _params;
QueryTerm _termA;
QueryTerm _termB;
const fef::MatchData *_md;
diff --git a/searchlib/src/vespa/searchlib/fef/termfieldmatchdataposition.h b/searchlib/src/vespa/searchlib/fef/termfieldmatchdataposition.h
index 2ec17385f83..8e2f4c62193 100644
--- a/searchlib/src/vespa/searchlib/fef/termfieldmatchdataposition.h
+++ b/searchlib/src/vespa/searchlib/fef/termfieldmatchdataposition.h
@@ -49,7 +49,6 @@ class TermFieldMatchDataPosition : public TermFieldMatchDataPositionKey
private:
int32_t _elementWeight;
uint32_t _elementLen;
- uint32_t _matchLength;
double _matchExactness; // or possibly _matchWeight
public:
@@ -57,7 +56,6 @@ public:
: TermFieldMatchDataPositionKey(),
_elementWeight(1),
_elementLen(SEARCHLIB_FEF_UNKNOWN_FIELD_LENGTH),
- _matchLength(1),
_matchExactness(1.0)
{ }
@@ -84,7 +82,6 @@ public:
: TermFieldMatchDataPositionKey(elementId, position),
_elementWeight(elementWeight),
_elementLen(elementLen),
- _matchLength(1),
_matchExactness(1.0)
{ }
diff --git a/searchlib/src/vespa/searchlib/fef/test/ftlib.cpp b/searchlib/src/vespa/searchlib/fef/test/ftlib.cpp
index 88803eae85b..5f782697570 100644
--- a/searchlib/src/vespa/searchlib/fef/test/ftlib.cpp
+++ b/searchlib/src/vespa/searchlib/fef/test/ftlib.cpp
@@ -68,7 +68,7 @@ FtUtil::tokenize(const vespalib::string & str, const vespalib::string & separato
}
} else {
for (uint32_t i = 0; i < str.size(); ++i) {
- retval.push_back(vespalib::string("" + str[i]));
+ retval.push_back(str.substr(i, 1));
}
}
return retval;
diff --git a/searchlib/src/vespa/searchlib/parsequery/simplequerystack.cpp b/searchlib/src/vespa/searchlib/parsequery/simplequerystack.cpp
index 54c1073d33e..946bec964de 100644
--- a/searchlib/src/vespa/searchlib/parsequery/simplequerystack.cpp
+++ b/searchlib/src/vespa/searchlib/parsequery/simplequerystack.cpp
@@ -339,7 +339,7 @@ SimpleQueryStack::ReadString(const char *&p)
uint64_t
SimpleQueryStack::ReadUint64(const char *&p)
{
- uint64_t l = static_cast<uint64_t>(vespalib::nbo::n2h(*(const uint64_t *)p));
+ uint64_t l = static_cast<uint64_t>(vespalib::nbo::n2h(*(const uint64_t *)(const void *)p));
p += sizeof(uint64_t);
return l;
}
diff --git a/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.cpp b/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.cpp
index 0365a4d4f14..78ed12ac8da 100644
--- a/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.cpp
+++ b/searchlib/src/vespa/searchlib/parsequery/stackdumpiterator.cpp
@@ -47,7 +47,7 @@ vespalib::string SimpleQueryStackDumpIterator::readString(const char *&p) {
uint64_t SimpleQueryStackDumpIterator::readUint64(const char *&p) {
if (p + sizeof(uint64_t) > _bufEnd) throw false;
- uint64_t l = vespalib::nbo::n2h(*(const uint64_t *)p);
+ uint64_t l = vespalib::nbo::n2h(*(const uint64_t *)(const void *)p);
p += sizeof(uint64_t);
return l;
}
diff --git a/searchlib/src/vespa/searchlib/query/queryterm.cpp b/searchlib/src/vespa/searchlib/query/queryterm.cpp
index c48def1b24d..a824e39427d 100644
--- a/searchlib/src/vespa/searchlib/query/queryterm.cpp
+++ b/searchlib/src/vespa/searchlib/query/queryterm.cpp
@@ -24,7 +24,7 @@ CharInfo::CharInfo()
// XXX: Should refactor to reduce number of magic constants.
memset(_charInfo, 0x01, 128); // All 7 bits are ascii7bit
memset(_charInfo+128, 0x00, 128); // The rest are not.
- memset(_charInfo + '0', 0x07, 10);
+ memset(_charInfo + static_cast<uint8_t>('0'), 0x07, 10);
_charInfo[uint8_t('-')] = 0x07;
_charInfo[uint8_t('<')] = 0x07;
_charInfo[uint8_t('>')] = 0x07;
diff --git a/searchlib/src/vespa/searchlib/queryeval/monitoring_search_iterator.h b/searchlib/src/vespa/searchlib/queryeval/monitoring_search_iterator.h
index e033fed83b8..2036dbc8c49 100644
--- a/searchlib/src/vespa/searchlib/queryeval/monitoring_search_iterator.h
+++ b/searchlib/src/vespa/searchlib/queryeval/monitoring_search_iterator.h
@@ -63,7 +63,6 @@ public:
vespalib::string _str;
int _currIndent;
std::stack<StructType> _stack;
- uint32_t _numberWidth;
void addIndent();
void addText(const vespalib::string &value);
diff --git a/searchlib/src/vespa/searchlib/queryeval/predicate_search.cpp b/searchlib/src/vespa/searchlib/queryeval/predicate_search.cpp
index c9ab167868a..a49f44a2853 100644
--- a/searchlib/src/vespa/searchlib/queryeval/predicate_search.cpp
+++ b/searchlib/src/vespa/searchlib/queryeval/predicate_search.cpp
@@ -109,8 +109,7 @@ PredicateSearch::PredicateSearch(const uint8_t * minFeatureVector,
_visited(new bool[max_interval_range+1]),
_termFieldMatchData(tfmda.valid()? tfmda[0] : nullptr),
_min_feature_vector(minFeatureVector),
- _interval_range_vector(interval_range_vector),
- _max_interval_range(max_interval_range)
+ _interval_range_vector(interval_range_vector)
{
for (size_t i = 0; i < _posting_lists.size(); ++i) {
diff --git a/searchlib/src/vespa/searchlib/queryeval/predicate_search.h b/searchlib/src/vespa/searchlib/queryeval/predicate_search.h
index 99c3355ff24..54dfdfa99c4 100644
--- a/searchlib/src/vespa/searchlib/queryeval/predicate_search.h
+++ b/searchlib/src/vespa/searchlib/queryeval/predicate_search.h
@@ -45,7 +45,6 @@ class PredicateSearch : public SearchIterator {
fef::TermFieldMatchData *_termFieldMatchData;
const uint8_t * _min_feature_vector;
const IntervalRange * _interval_range_vector;
- const IntervalRange _max_interval_range;
VESPA_DLL_LOCAL bool advanceOneTo(uint32_t doc_id, size_t index);
VESPA_DLL_LOCAL void advanceAllTo(uint32_t doc_id);
diff --git a/searchlib/src/vespa/searchlib/tensor/tensor_store.cpp b/searchlib/src/vespa/searchlib/tensor/tensor_store.cpp
index acee82a483c..b7edf0dd5d4 100644
--- a/searchlib/src/vespa/searchlib/tensor/tensor_store.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/tensor_store.cpp
@@ -7,8 +7,6 @@ namespace search {
namespace tensor {
-constexpr size_t MIN_BUFFER_CLUSTERS = 1024;
-
TensorStore::TensorStore(datastore::DataStoreBase &store)
: _store(store),
_typeId(0)
diff --git a/searchlib/src/vespa/searchlib/test/fakedata/fakeegcompr64filterocc.cpp b/searchlib/src/vespa/searchlib/test/fakedata/fakeegcompr64filterocc.cpp
index 7eda569924c..0de200ae32c 100644
--- a/searchlib/src/vespa/searchlib/test/fakedata/fakeegcompr64filterocc.cpp
+++ b/searchlib/src/vespa/searchlib/test/fakedata/fakeegcompr64filterocc.cpp
@@ -159,12 +159,9 @@ setupT(const FakeWord &fw)
typedef FakeWord FW;
typedef FW::DocWordFeatureList DWFL;
- typedef FW::DocWordPosFeatureList DWPFL;
DWFL::const_iterator d(fw._postings.begin());
DWFL::const_iterator de(fw._postings.end());
- DWPFL::const_iterator p(fw._wordPosFeatures.begin());
- DWPFL::const_iterator pe(fw._wordPosFeatures.end());
if (d != de) {
// Prefix support needs counts embedded in posting list
diff --git a/searchlib/src/vespa/searchlib/test/fakedata/fakezcbfilterocc.cpp b/searchlib/src/vespa/searchlib/test/fakedata/fakezcbfilterocc.cpp
index 16a1d56883b..81d18c4b11a 100644
--- a/searchlib/src/vespa/searchlib/test/fakedata/fakezcbfilterocc.cpp
+++ b/searchlib/src/vespa/searchlib/test/fakedata/fakezcbfilterocc.cpp
@@ -44,13 +44,13 @@ do { \
resop (valI[0] >> 1); \
valI += 1; \
} else if (__builtin_expect((valI[0] & 2) != 0, true)) { \
- resop (((*(const uint32_t *) valI) >> 2) & ((1 << 14) - 1)); \
+ resop (((*(const uint32_t *) (const void *)valI) >> 2) & ((1 << 14) - 1)); \
valI += 2; \
} else if (__builtin_expect((valI[0] & 4) != 0, true)) { \
- resop (((*(const uint32_t *) valI) >> 3) & ((1 << 21) - 1)); \
+ resop (((*(const uint32_t *) (const void *)valI) >> 3) & ((1 << 21) - 1)); \
valI += 3; \
} else { \
- resop ((*(const uint32_t *) valI) >> 4); \
+ resop ((*(const uint32_t *) (const void *) valI) >> 4); \
valI += 4; \
} \
} while (0)
@@ -59,8 +59,7 @@ FakeZcbFilterOcc::FakeZcbFilterOcc(const FakeWord &fw)
: FakePosting(fw.getName() + ".zcbfilterocc"),
_compressed(),
_docIdLimit(0),
- _hitDocs(0),
- _bitSize(0)
+ _hitDocs(0)
{
std::vector<uint8_t> bytes;
uint32_t lastDocId = 0u;
@@ -68,12 +67,9 @@ FakeZcbFilterOcc::FakeZcbFilterOcc(const FakeWord &fw)
typedef FakeWord FW;
typedef FW::DocWordFeatureList DWFL;
- typedef FW::DocWordPosFeatureList DWPFL;
DWFL::const_iterator d(fw._postings.begin());
DWFL::const_iterator de(fw._postings.end());
- DWPFL::const_iterator p(fw._wordPosFeatures.begin());
- DWPFL::const_iterator pe(fw._wordPosFeatures.end());
while (d != de) {
if (lastDocId == 0u) {
diff --git a/searchlib/src/vespa/searchlib/test/fakedata/fakezcbfilterocc.h b/searchlib/src/vespa/searchlib/test/fakedata/fakezcbfilterocc.h
index 6140cc6a1dc..e367ec4e35d 100644
--- a/searchlib/src/vespa/searchlib/test/fakedata/fakezcbfilterocc.h
+++ b/searchlib/src/vespa/searchlib/test/fakedata/fakezcbfilterocc.h
@@ -17,7 +17,6 @@ private:
std::vector<uint8_t> _compressed;
unsigned int _docIdLimit;
unsigned int _hitDocs;
- size_t _bitSize;
public:
FakeZcbFilterOcc(const FakeWord &fw);
~FakeZcbFilterOcc();
diff --git a/searchlib/src/vespa/searchlib/test/imported_attribute_fixture.h b/searchlib/src/vespa/searchlib/test/imported_attribute_fixture.h
index 1c4813a5c45..c37cfc38a8c 100644
--- a/searchlib/src/vespa/searchlib/test/imported_attribute_fixture.h
+++ b/searchlib/src/vespa/searchlib/test/imported_attribute_fixture.h
@@ -244,7 +244,7 @@ struct ImportedAttributeFixture {
reset_with_new_target_attr(create_single_attribute<AttrVecType>(type, fast_search, filter));
// Fun experiment: rename `auto& mapping` to `auto& m` and watch GCC howl about
// shadowing a variable... that exists in the set_up_and_map function!
- set_up_and_map<AttrVecType>(mappings, [this](auto &target_vec, auto &mapping) {
+ set_up_and_map<AttrVecType>(mappings, [](auto &target_vec, auto &mapping) {
ASSERT_TRUE(target_vec.update(mapping._to_lid, mapping._value_in_target_attr));
});
}
@@ -254,7 +254,7 @@ struct ImportedAttributeFixture {
BasicType type,
const std::vector<LidToLidMapping<std::vector<ValueType>>> &mappings) {
reset_with_new_target_attr(create_array_attribute<AttrVecType>(type));
- set_up_and_map<AttrVecType>(mappings, [this](auto &target_vec, auto &mapping) {
+ set_up_and_map<AttrVecType>(mappings, [](auto &target_vec, auto &mapping) {
constexpr uint32_t weight = 1;
for (const auto &v : mapping._value_in_target_attr) {
ASSERT_TRUE(target_vec.append(mapping._to_lid, v, weight));
@@ -268,7 +268,7 @@ struct ImportedAttributeFixture {
const std::vector<LidToLidMapping<std::vector<WeightedValueType>>> &mappings,
FastSearchConfig fast_search = FastSearchConfig::Default) {
reset_with_new_target_attr(create_wset_attribute<AttrVecType>(type, fast_search));
- set_up_and_map<AttrVecType>(mappings, [this](auto &target_vec, auto &mapping) {
+ set_up_and_map<AttrVecType>(mappings, [](auto &target_vec, auto &mapping) {
for (const auto &v : mapping._value_in_target_attr) {
ASSERT_TRUE(target_vec.append(mapping._to_lid, v.value(), v.weight()));
}
@@ -279,7 +279,7 @@ struct ImportedAttributeFixture {
void reset_with_tensor_reference_mappings(const vespalib::eval::ValueType &tensorType,
const std::vector<LidToLidMapping<ValueType>> &mappings) {
reset_with_new_target_attr(create_tensor_attribute<AttrVecType>(tensorType));
- set_up_and_map<AttrVecType>(mappings, [this](auto &target_vec, auto &mapping) {
+ set_up_and_map<AttrVecType>(mappings, [](auto &target_vec, auto &mapping) {
target_vec.setTensor(mapping._to_lid, *mapping._value_in_target_attr);
});
}