summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--searchcore/src/vespa/searchcore/fdispatch/common/appcontext.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp5
-rw-r--r--searchcore/src/vespa/searchcore/proton/flushengine/threadedflushtarget.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp1
-rw-r--r--searchlib/src/tests/attribute/bitvector/bitvector_test.cpp1
-rw-r--r--searchlib/src/tests/bitcompression/expgolomb/expgolomb_test.cpp1
-rw-r--r--searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp3
-rw-r--r--searchlib/src/tests/util/statefile/statefile_test.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postingstore.cpp9
-rw-r--r--searchlib/src/vespa/searchlib/bitcompression/compression.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/btree/btreestore.hpp1
-rw-r--r--searchlib/src/vespa/searchlib/common/bitvector.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/common/growablebitvector.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/common/packets.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/datastore/bufferstate.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/diskindex/pagedict4file.cpp3
-rw-r--r--searchlib/src/vespa/searchlib/docstore/logdatastore.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/docstore/logdatastore.h5
-rw-r--r--searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/fef/test/indexenvironment.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/memoryindex/compact_document_words_store.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/test/diskindex/testdiskindex.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/transactionlog/domain.cpp4
-rw-r--r--searchlib/src/vespa/searchlib/transactionlog/domainpart.cpp1
-rw-r--r--searchlib/src/vespa/searchlib/transactionlog/translogserverapp.cpp1
-rw-r--r--staging_vespalib/src/vespa/vespalib/stllike/cache.h2
-rw-r--r--vdstestlib/src/vespa/vdstestlib/cppunit/dirconfig.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/eval/basic_nodes.h7
-rw-r--r--vespalib/src/vespa/vespalib/eval/simple_tensor.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/eval/tensor_nodes.h2
-rw-r--r--vespalib/src/vespa/vespalib/hwaccelrated/iaccelrated.cpp5
-rw-r--r--vespalib/src/vespa/vespalib/tensor/dense/mutable_dense_tensor_view.h1
-rw-r--r--vespalib/src/vespa/vespalib/tensor/serialization/typed_binary_format.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/tensor/sparse/sparse_tensor_builder.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/alloc.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/generationhandler.h1
-rw-r--r--vespalib/src/vespa/vespalib/util/threadstackexecutorbase.h1
41 files changed, 83 insertions, 2 deletions
diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.cpp b/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.cpp
index 720bf2e6377..15655d38cce 100644
--- a/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.cpp
+++ b/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.cpp
@@ -14,6 +14,7 @@ FastS_TimeKeeper::FastS_TimeKeeper()
{
bool ok = _thread_pool.NewThread(&_clock);
assert(ok);
+ (void) ok;
}
diff --git a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.cpp b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.cpp
index 9f96d4ae02a..10ca7b2905e 100644
--- a/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.cpp
+++ b/searchcore/src/vespa/searchcore/proton/bucketdb/bucketdb.cpp
@@ -175,6 +175,7 @@ BucketDB::checkEmpty(void) const
for (auto &entry : _map) {
const BucketState &state = entry.second;
assert(state.empty());
+ (void) state;
}
}
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
index 8a90c9a0b30..fb2a25361ee 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/documentmetastore.cpp
@@ -896,6 +896,7 @@ DocumentMetaStore::handleJoin(const bucketdb::JoinBucketsSession &session)
assert(validLid(lid));
RawDocumentMetaData &metaData = _metaDataStore[lid];
uint8_t bucketUsedBits = metaData.getBucketUsedBits();
+ (void) bucketUsedBits;
assert(bucketUsedBits >= BucketId::minNumBits() &&
bucketUsedBits <= BucketId::maxNumBits());
BucketId s(metaData.getBucketId());
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
index 3f44d63d234..6870eec8827 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/lid_allocator.cpp
@@ -121,6 +121,7 @@ LidAllocator::trimHoldLists(generation_t firstUsed)
void
LidAllocator::moveLidBegin(DocId fromLid, DocId toLid)
{
+ (void) fromLid;
assert(!_pendingHoldLids.testBit(fromLid));
assert(!_pendingHoldLids.testBit(toLid));
if (isFreeListConstructed()) {
@@ -149,6 +150,7 @@ LidAllocator::holdLid(DocId lid,
DocId lidLimit,
generation_t currentGeneration)
{
+ (void) lidLimit;
assert(holdLidOK(lid, lidLimit));
assert(isFreeListConstructed());
assert(lid < _usedLids.size());
@@ -163,6 +165,7 @@ LidAllocator::holdLids(const std::vector<DocId> &lids,
DocId lidLimit,
generation_t currentGeneration)
{
+ (void) lidLimit;
for (const auto &lid : lids) {
assert(lid > 0);
assert(holdLidOK(lid, lidLimit));
@@ -295,6 +298,8 @@ LidAllocator::commitActiveLids()
void
LidAllocator::clearDocs(DocId lidLow, DocId lidLimit)
{
+ (void) lidLow;
+ (void) lidLimit;
assert(_usedLids.getNextTrueBit(lidLow) >= lidLimit);
}
diff --git a/searchcore/src/vespa/searchcore/proton/flushengine/threadedflushtarget.cpp b/searchcore/src/vespa/searchcore/proton/flushengine/threadedflushtarget.cpp
index 15ddf3d1e08..49d400c95f7 100644
--- a/searchcore/src/vespa/searchcore/proton/flushengine/threadedflushtarget.cpp
+++ b/searchcore/src/vespa/searchcore/proton/flushengine/threadedflushtarget.cpp
@@ -40,6 +40,7 @@ callInitFlush(IFlushTarget *target, IFlushTarget::SerialNum serial,
const IGetSerialNum *getSerialNum) {
// Serial number from flush engine might have become stale, obtain
// a fresh serial number now.
+ (void) serial;
search::SerialNum freshSerial = getSerialNum->getSerialNum();
assert(freshSerial >= serial);
return target->initFlush(freshSerial);
diff --git a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
index c5cf0ee34b8..5c9c4982f95 100644
--- a/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/feedhandler.cpp
@@ -579,6 +579,7 @@ FeedHandler::replayTransactionLog(SerialNum flushedIndexMgrSerial,
SerialNum newestFlushedSerial,
ConfigStore &config_store)
{
+ (void) newestFlushedSerial;
assert(_activeFeedView);
assert(_bucketDBHandler);
FeedState::SP state = std::make_shared<ReplayTransactionLogState>
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
index f649f43a636..b01ffc38622 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
@@ -613,6 +613,7 @@ moveMetaData(documentmetastore::IStore &meta_store,
const DocumentId &doc_id,
const DocumentOperation &op)
{
+ (void) doc_id;
assert(op.getLid() != op.getPrevLid());
assert(meta_store.validLid(op.getPrevLid()));
assert(!meta_store.validLid(op.getLid()));
diff --git a/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp b/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
index 85f83d217eb..bcac0c94776 100644
--- a/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
+++ b/searchlib/src/tests/attribute/bitvector/bitvector_test.cpp
@@ -408,6 +408,7 @@ BitVectorTest::checkSearch(AttributePtr v,
bool weights,
bool checkStride)
{
+ (void) checkStride;
sb->initFullRange();
sb->seek(1u);
uint32_t docId = sb->getDocId();
diff --git a/searchlib/src/tests/bitcompression/expgolomb/expgolomb_test.cpp b/searchlib/src/tests/bitcompression/expgolomb/expgolomb_test.cpp
index dcf0f69ee55..001a420e83f 100644
--- a/searchlib/src/tests/bitcompression/expgolomb/expgolomb_test.cpp
+++ b/searchlib/src/tests/bitcompression/expgolomb/expgolomb_test.cpp
@@ -203,6 +203,7 @@ public:
void
addConstKFactory(int kValue, IDecodeFuncFactory factory)
{
+ (void) kValue;
assert(static_cast<unsigned int>(kValue) == _constK.size());
_constK.push_back(factory);
}
diff --git a/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp b/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp
index 03d73e84b42..d8ad1698c9d 100644
--- a/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp
+++ b/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp
@@ -499,6 +499,7 @@ checkCounts(const std::string &word,
(void) word;
(void) fileOffset;
const WordIndexCounts *j = &i._counts;
+ (void) j;
assert(counts._bitLength == j->_bitLength);
assert(counts._numDocs == j->_numDocs);
assert(fileOffset._fileOffset == j->_fileOffset);
@@ -662,6 +663,7 @@ testWords(const std::string &logname,
tuneFileWrite,
fileHeaderContext);
assert(openres);
+ (void) openres;
for (std::vector<WordCounts>::const_iterator
i = myrand.begin(),
@@ -730,6 +732,7 @@ testWords(const std::string &logname,
PostingListCounts rCounts;
uint64_t wOffset;
uint64_t rOffset;
+ (void) rOffset;
PostingListOffsetAndCounts rOffsetAndCounts;
uint64_t wordNum = 1;
uint64_t checkWordNum = 5;
diff --git a/searchlib/src/tests/util/statefile/statefile_test.cpp b/searchlib/src/tests/util/statefile/statefile_test.cpp
index 583d21e1cec..b932ec03bb2 100644
--- a/searchlib/src/tests/util/statefile/statefile_test.cpp
+++ b/searchlib/src/tests/util/statefile/statefile_test.cpp
@@ -72,6 +72,7 @@ void
setSize(const char *name, int64_t newSize)
{
int truncRes = truncate(name, newSize);
+ (void) truncRes;
assert(truncRes == 0);
}
diff --git a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
index 430443cfc9d..fb93138d2c9 100644
--- a/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
+++ b/searchlib/src/vespa/searchlib/attribute/postingstore.cpp
@@ -98,6 +98,7 @@ PostingStore<DataT>::removeSparseBitVectors()
for (auto &i : _bvs) {
RefType iRef(i);
uint32_t typeId = getTypeId(iRef);
+ (void) typeId;
assert(isBitVector(typeId));
BitVectorEntry *bve = getWBitVectorEntry(iRef);
GrowableBitVector &bv = *bve->_bv.get();
@@ -107,6 +108,7 @@ PostingStore<DataT>::removeSparseBitVectors()
assert(isBTree(iRef2));
const BTreeType *tree = getTreeEntry(iRef2);
assert(tree->size(_allocator) == docFreq);
+ (void) tree;
}
if (docFreq < _minBvDocFreq)
needscan = true;
@@ -145,6 +147,7 @@ PostingStore<DataT>::removeSparseBitVectors()
assert(isBTree(iRef2));
const BTreeType *tree = getTreeEntry(iRef2);
assert(tree->size(_allocator) == docFreq);
+ (void) tree;
}
if (docFreq < _minBvDocFreq) {
dropBitVector(ref);
@@ -218,6 +221,7 @@ PostingStore<DataT>::dropBitVector(EntryRef &ref)
RefType iRef(ref);
uint32_t typeId = getTypeId(iRef);
assert(isBitVector(typeId));
+ (void) typeId;
BitVectorEntry *bve = getWBitVectorEntry(iRef);
AllocatedBitVector *bv = bve->_bv.get();
assert(bv);
@@ -230,6 +234,8 @@ PostingStore<DataT>::dropBitVector(EntryRef &ref)
assert(isBTree(ref2));
const BTreeType *tree = getTreeEntry(ref2);
assert(tree->size(_allocator) == docFreq);
+ (void) tree;
+ (void) docFreq;
_bvs.erase(ref.ref());
_store.holdElem(iRef, 1);
_status.decBitVectors();
@@ -246,11 +252,13 @@ PostingStore<DataT>::makeBitVector(EntryRef &ref)
RefType iRef(ref);
uint32_t typeId = getTypeId(iRef);
assert(isBTree(typeId));
+ (void) typeId;
std::shared_ptr<GrowableBitVector> bvsp;
vespalib::GenerationHolder &genHolder = _store.getGenerationHolder();
bvsp.reset(new GrowableBitVector(_bvSize, _bvCapacity, genHolder));
AllocatedBitVector &bv = *bvsp.get();
uint32_t docIdLimit = _bvSize;
+ (void) docIdLimit;
Iterator it = begin(ref);
uint32_t expDocFreq = it.size();
(void) expDocFreq;
@@ -292,6 +300,7 @@ PostingStore<DataT>::applyNewBitVector(EntryRef &ref,
bvsp.reset(new GrowableBitVector(_bvSize, _bvCapacity, genHolder));
AllocatedBitVector &bv = *bvsp.get();
uint32_t docIdLimit = _bvSize;
+ (void) docIdLimit;
uint32_t expDocFreq = ae - aOrg;
(void) expDocFreq;
for (AddIter a = aOrg; a != ae; ++a) {
diff --git a/searchlib/src/vespa/searchlib/bitcompression/compression.cpp b/searchlib/src/vespa/searchlib/bitcompression/compression.cpp
index 06c96dc96ee..7ead25c3b6a 100644
--- a/searchlib/src/vespa/searchlib/bitcompression/compression.cpp
+++ b/searchlib/src/vespa/searchlib/bitcompression/compression.cpp
@@ -210,6 +210,7 @@ readHeader(vespalib::GenericHeader &header, int64_t fileSize)
dataBuffer.moveFreeToData(headerLen - hhSize);
}
uint32_t len = header.read(bufferReader);
+ (void) len;
assert(len >= header.getSize());
assert(len == headerLen);
return headerLen;
diff --git a/searchlib/src/vespa/searchlib/btree/btreestore.hpp b/searchlib/src/vespa/searchlib/btree/btreestore.hpp
index ab9ebaaf95e..a0b8d688c27 100644
--- a/searchlib/src/vespa/searchlib/btree/btreestore.hpp
+++ b/searchlib/src/vespa/searchlib/btree/btreestore.hpp
@@ -691,6 +691,7 @@ applyNewTree(EntryRef &ref,
BTreeType *tree = tPair.second;
applyBuildTree(tree, a, ae, nullptr, nullptr, comp);
assert(tree->size(_allocator) == additionSize);
+ (void) additionSize;
ref = tPair.first;
}
diff --git a/searchlib/src/vespa/searchlib/common/bitvector.cpp b/searchlib/src/vespa/searchlib/common/bitvector.cpp
index 4f04a557085..e21d6c8e87a 100644
--- a/searchlib/src/vespa/searchlib/common/bitvector.cpp
+++ b/searchlib/src/vespa/searchlib/common/bitvector.cpp
@@ -284,6 +284,7 @@ BitVector::grow(Index newSize, Index newCapacity)
(void) newSize;
(void) newCapacity;
assert(false);
+ return GenerationHeldBase::UP();
}
size_t
diff --git a/searchlib/src/vespa/searchlib/common/growablebitvector.cpp b/searchlib/src/vespa/searchlib/common/growablebitvector.cpp
index f3a4e87257c..6e8948b38c1 100644
--- a/searchlib/src/vespa/searchlib/common/growablebitvector.cpp
+++ b/searchlib/src/vespa/searchlib/common/growablebitvector.cpp
@@ -43,6 +43,7 @@ GrowableBitVector::shrink(Index newCapacity)
{
Index oldCapacity = capacity();
assert(newCapacity <= oldCapacity);
+ (void) oldCapacity;
hold(grow(newCapacity, std::max(capacity(), newCapacity)));
}
diff --git a/searchlib/src/vespa/searchlib/common/packets.cpp b/searchlib/src/vespa/searchlib/common/packets.cpp
index 274188c87f9..190f4d4ef63 100644
--- a/searchlib/src/vespa/searchlib/common/packets.cpp
+++ b/searchlib/src/vespa/searchlib/common/packets.cpp
@@ -468,6 +468,7 @@ bool
FS4Packet_Shared::Decode(FNET_DataBuffer *, uint32_t )
{
assert(false);
+ return false;
}
vespalib::string
@@ -536,6 +537,7 @@ bool
FS4Packet_PreSerialized::Decode(FNET_DataBuffer *, uint32_t)
{
assert(false);
+ return false;
}
vespalib::string
diff --git a/searchlib/src/vespa/searchlib/datastore/bufferstate.cpp b/searchlib/src/vespa/searchlib/datastore/bufferstate.cpp
index 76780114008..68501ecc41d 100644
--- a/searchlib/src/vespa/searchlib/datastore/bufferstate.cpp
+++ b/searchlib/src/vespa/searchlib/datastore/bufferstate.cpp
@@ -174,6 +174,7 @@ BufferState::onActive(uint32_t bufferId, uint32_t typeId,
assert(_freeListList == NULL || _freeListList->_head != this);
size_t reservedElements = typeHandler->getReservedElements(bufferId);
+ (void) reservedElements;
size_t allocClusters = typeHandler->calcClustersToAlloc(bufferId, sizeNeeded, maxClusters);
size_t allocSize = allocClusters * typeHandler->getClusterSize();
assert(allocSize >= reservedElements + sizeNeeded);
diff --git a/searchlib/src/vespa/searchlib/diskindex/pagedict4file.cpp b/searchlib/src/vespa/searchlib/diskindex/pagedict4file.cpp
index 52379e2acb6..348262f1d0e 100644
--- a/searchlib/src/vespa/searchlib/diskindex/pagedict4file.cpp
+++ b/searchlib/src/vespa/searchlib/diskindex/pagedict4file.cpp
@@ -439,6 +439,9 @@ PageDict4FileSeqWrite::open(const vespalib::string &name,
assert(pFileSize >= pBufferStartFilePos);
assert(spFileSize >= spBufferStartFilePos);
assert(ssFileSize >= ssBufferStartFilePos);
+ (void) pFileSize;
+ (void) spFileSize;
+ (void) ssFileSize;
_pfile.SetSize(pBufferStartFilePos);
_spfile.SetSize(spBufferStartFilePos);
_ssfile.SetSize(ssBufferStartFilePos);
diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
index 732e844c757..091aa8949b8 100644
--- a/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.cpp
@@ -428,6 +428,7 @@ bool LogDataStore::shouldCompactToActiveFile(size_t compactedSize) const {
void LogDataStore::setNewFileChunk(const LockGuard & guard, FileChunk::UP file)
{
+ (void) guard;
assert(guard.locks(_updateLock));
size_t fileId = file->getFileId().getId();
assert( ! _fileChunks[fileId]);
diff --git a/searchlib/src/vespa/searchlib/docstore/logdatastore.h b/searchlib/src/vespa/searchlib/docstore/logdatastore.h
index abb0c536fe2..b2519cdfdc2 100644
--- a/searchlib/src/vespa/searchlib/docstore/logdatastore.h
+++ b/searchlib/src/vespa/searchlib/docstore/logdatastore.h
@@ -190,6 +190,7 @@ public:
}
FileId getActiveFileId(const vespalib::LockGuard & guard) const {
assert(guard.locks(_updateLock));
+ (void) guard;
return _active;
}
@@ -230,20 +231,24 @@ private:
WriteableFileChunk & getActive(const LockGuard & guard) {
assert(guard.locks(_updateLock));
+ (void) guard;
return static_cast<WriteableFileChunk &>(*_fileChunks[_active.getId()]);
}
const WriteableFileChunk & getActive(const LockGuard & guard) const {
assert(guard.locks(_updateLock));
+ (void) guard;
return static_cast<const WriteableFileChunk &>(*_fileChunks[_active.getId()]);
}
const FileChunk * getPrevActive(const LockGuard & guard) const {
assert(guard.locks(_updateLock));
+ (void) guard;
return ( !_prevActive.isActive() ) ? _fileChunks[_prevActive.getId()].get() : NULL;
}
void setActive(const LockGuard & guard, FileId fileId) {
assert(guard.locks(_updateLock));
+ (void) guard;
_prevActive = _active;
_active = fileId;
}
diff --git a/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp b/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp
index 3c7f5d283f7..c462b23341f 100644
--- a/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp
+++ b/searchlib/src/vespa/searchlib/docstore/writeablefilechunk.cpp
@@ -310,6 +310,7 @@ WriteableFileChunk::drainQ()
void
WriteableFileChunk::insertChunks(ProcessedChunkMap & orderedChunks, ProcessedChunkQ & newChunks, const uint32_t nextChunkId)
{
+ (void) nextChunkId;
for (auto &chunk : newChunks) {
if (chunk.get() != 0) {
assert(chunk->getChunkId() >= nextChunkId);
@@ -372,6 +373,7 @@ WriteableFileChunk::computeChunkMeta(ProcessedChunkQ & chunks, size_t startPos,
ChunkMetaV cmetaV;
cmetaV.reserve(chunks.size());
uint64_t lastSerial(_lastPersistedSerialNum);
+ (void) lastSerial;
LockGuard guard(_lock);
if (!_pendingChunks.empty()) {
@@ -468,6 +470,7 @@ WriteableFileChunk::fileWriter(const uint32_t firstChunkId)
assert(_writeQ.empty());
assert(_chunkMap.empty());
for (const ChunkInfo & cm : _chunkInfo) {
+ (void) cm;
assert(cm.valid() && cm.getSize() != 0);
}
_writeTaskIsRunning = false;
@@ -530,6 +533,7 @@ WriteableFileChunk::getDiskFootprint() const
size_t
WriteableFileChunk::getDiskFootprint(const vespalib::MonitorGuard & guard) const
{
+ (void) guard;
assert(guard.monitors(_lock));
return frozen()
? FileChunk::getDiskFootprint()
@@ -756,6 +760,7 @@ WriteableFileChunk::needFlushPendingChunks(uint64_t serialNum, uint64_t datFileL
bool
WriteableFileChunk::needFlushPendingChunks(const MonitorGuard & guard, uint64_t serialNum, uint64_t datFileLen)
{
+ (void) guard;
assert(guard.monitors(_lock));
if (_pendingChunks.empty())
return false;
@@ -796,6 +801,7 @@ WriteableFileChunk::flushPendingChunks(uint64_t serialNum) {
fastos::TimeStamp
WriteableFileChunk::unconditionallyFlushPendingChunks(const vespalib::LockGuard &flushGuard, uint64_t serialNum, uint64_t datFileLen)
{
+ (void) flushGuard;
assert(flushGuard.locks(_flushLock));
if ( ! _dataFile.Sync()) {
throw SummaryException("Failed fsync of dat file", _dataFile, VESPA_STRLOC);
diff --git a/searchlib/src/vespa/searchlib/fef/test/indexenvironment.cpp b/searchlib/src/vespa/searchlib/fef/test/indexenvironment.cpp
index 59903668fdb..490130ec0ef 100644
--- a/searchlib/src/vespa/searchlib/fef/test/indexenvironment.cpp
+++ b/searchlib/src/vespa/searchlib/fef/test/indexenvironment.cpp
@@ -69,6 +69,7 @@ IndexEnvironment::addConstantValue(const vespalib::string &name,
Constant(std::move(type),
std::move(value)));
assert(insertRes.second); // successful insert
+ (void) insertRes;
}
} // namespace test
diff --git a/searchlib/src/vespa/searchlib/memoryindex/compact_document_words_store.cpp b/searchlib/src/vespa/searchlib/memoryindex/compact_document_words_store.cpp
index f10e872daeb..520e691203a 100644
--- a/searchlib/src/vespa/searchlib/memoryindex/compact_document_words_store.cpp
+++ b/searchlib/src/vespa/searchlib/memoryindex/compact_document_words_store.cpp
@@ -112,6 +112,7 @@ CompactDocumentWordsStore::Store::insert(const Builder &builder)
uint32_t *begin = _store.getBufferEntry<uint32_t>(activeBufferId, oldSize);
uint32_t *end = serialize(builder, begin);
assert(size_t(end - begin) == serializedSize);
+ (void) end;
state.pushed_back(serializedSize);
return ref;
diff --git a/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp b/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
index 2708d74fdd9..baaafc853ff 100644
--- a/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
+++ b/searchlib/src/vespa/searchlib/tensor/dense_tensor_store.cpp
@@ -223,10 +223,13 @@ namespace
void
checkMatchingType(const ValueType &lhs, const ValueType &rhs, size_t numCells)
{
+ (void) numCells;
size_t checkNumCells = 1u;
auto rhsItr = rhs.dimensions().cbegin();
auto rhsItrEnd = rhs.dimensions().cend();
+ (void) rhsItrEnd;
for (const auto &dim : lhs.dimensions()) {
+ (void) dim;
assert(rhsItr != rhsItrEnd);
assert(dim.name == rhsItr->name);
assert(rhsItr->is_bound());
@@ -245,6 +248,7 @@ setDenseTensorUnboundDimSizes(void *buffer, const ValueType &lhs, uint32_t numUn
uint32_t *unboundDimSize = unboundDimSizeEnd - numUnboundDims;
auto rhsItr = rhs.dimensions().cbegin();
auto rhsItrEnd = rhs.dimensions().cend();
+ (void) rhsItrEnd;
for (const auto &dim : lhs.dimensions()) {
assert (rhsItr != rhsItrEnd);
if (!dim.is_bound()) {
diff --git a/searchlib/src/vespa/searchlib/test/diskindex/testdiskindex.cpp b/searchlib/src/vespa/searchlib/test/diskindex/testdiskindex.cpp
index 41cb1cea68a..0fd34af84a4 100644
--- a/searchlib/src/vespa/searchlib/test/diskindex/testdiskindex.cpp
+++ b/searchlib/src/vespa/searchlib/test/diskindex/testdiskindex.cpp
@@ -108,6 +108,7 @@ TestDiskIndex::openIndex(const std::string &dir, bool directio, bool readmmap,
_index.reset(new DiskIndex(dir));
bool ok(_index->setup(tuneFileRead));
assert(ok);
+ (void) ok;
}
TestDiskIndex::TestDiskIndex() :
diff --git a/searchlib/src/vespa/searchlib/transactionlog/domain.cpp b/searchlib/src/vespa/searchlib/transactionlog/domain.cpp
index a102533b139..d7d28b937ba 100644
--- a/searchlib/src/vespa/searchlib/transactionlog/domain.cpp
+++ b/searchlib/src/vespa/searchlib/transactionlog/domain.cpp
@@ -135,6 +135,7 @@ Domain::begin() const
SerialNum
Domain::begin(const LockGuard & guard) const
{
+ (void) guard;
assert(guard.locks(_lock));
SerialNum s(0);
if ( ! _parts.empty() ) {
@@ -152,6 +153,7 @@ Domain::end() const
SerialNum
Domain::end(const LockGuard & guard) const
{
+ (void) guard;
assert(guard.locks(_lock));
SerialNum s(0);
if ( ! _parts.empty() ) {
@@ -169,6 +171,7 @@ Domain::byteSize() const
size_t
Domain::byteSize(const LockGuard & guard) const
{
+ (void) guard;
assert(guard.locks(_lock));
size_t size = 0;
for (const auto &entry : _parts) {
@@ -232,6 +235,7 @@ uint64_t Domain::size() const
uint64_t Domain::size(const LockGuard & guard) const
{
+ (void) guard;
assert(guard.locks(_lock));
uint64_t sz(0);
for (const auto & part : _parts) {
diff --git a/searchlib/src/vespa/searchlib/transactionlog/domainpart.cpp b/searchlib/src/vespa/searchlib/transactionlog/domainpart.cpp
index edec458c3b9..44172b95f92 100644
--- a/searchlib/src/vespa/searchlib/transactionlog/domainpart.cpp
+++ b/searchlib/src/vespa/searchlib/transactionlog/domainpart.cpp
@@ -672,6 +672,7 @@ int32_t DomainPart::calcCrc(Crc version, const void * buf, size_t sz)
return calculator.checksum();
} else {
assert(false);
+ return 0;
}
}
diff --git a/searchlib/src/vespa/searchlib/transactionlog/translogserverapp.cpp b/searchlib/src/vespa/searchlib/transactionlog/translogserverapp.cpp
index 33918e373d1..b82e9f7ebe3 100644
--- a/searchlib/src/vespa/searchlib/transactionlog/translogserverapp.cpp
+++ b/searchlib/src/vespa/searchlib/transactionlog/translogserverapp.cpp
@@ -35,6 +35,7 @@ DomainPart::Crc getCrc(searchlib::TranslogserverConfig::Crcmethod crcType)
return DomainPart::xxh64;
}
assert(false);
+ return DomainPart::xxh64;
}
}
diff --git a/staging_vespalib/src/vespa/vespalib/stllike/cache.h b/staging_vespalib/src/vespa/vespalib/stllike/cache.h
index 02795510870..2304d6389b2 100644
--- a/staging_vespalib/src/vespa/vespalib/stllike/cache.h
+++ b/staging_vespalib/src/vespa/vespalib/stllike/cache.h
@@ -263,6 +263,7 @@ void
cache<P>::invalidate(const vespalib::LockGuard & guard, const K & key)
{
assert(guard.locks(_hashLock));
+ (void) guard;
if (Lru::hasKey(key)) {
_sizeBytes -= calcSize(key, (*this)[key]);
_invalidate++;
@@ -274,6 +275,7 @@ template< typename P >
bool
cache<P>::hasKey(const vespalib::LockGuard & guard, const K & key) const
{
+ (void) guard;
assert(guard.locks(_hashLock));
_lookup++;
return Lru::hasKey(key);
diff --git a/vdstestlib/src/vespa/vdstestlib/cppunit/dirconfig.cpp b/vdstestlib/src/vespa/vdstestlib/cppunit/dirconfig.cpp
index a5e6d844d9b..666ea593b89 100644
--- a/vdstestlib/src/vespa/vdstestlib/cppunit/dirconfig.cpp
+++ b/vdstestlib/src/vespa/vdstestlib/cppunit/dirconfig.cpp
@@ -27,6 +27,7 @@ public:
sprintf(_dirname, "dirconfig.tmp.XXXXXX");
char * realName = mkdtemp(_dirname);
assert(realName == _dirname);
+ (void) realName;
}
~Root() {
if (system((std::string("rm -rf ") + _dirname).c_str()) != 0) {
diff --git a/vespalib/src/vespa/vespalib/eval/basic_nodes.h b/vespalib/src/vespa/vespalib/eval/basic_nodes.h
index 41f7e2a6c18..6f42dbc0ecb 100644
--- a/vespalib/src/vespa/vespalib/eval/basic_nodes.h
+++ b/vespalib/src/vespa/vespalib/eval/basic_nodes.h
@@ -78,7 +78,10 @@ const T *as(const Node &node) { return dynamic_cast<const T *>(&node); }
**/
struct Leaf : public Node {
virtual size_t num_children() const override { return 0; }
- virtual const Node &get_child(size_t) const override { assert(false); }
+ virtual const Node &get_child(size_t) const override {
+ assert(false);
+ return *static_cast<const Node *>(nullptr);
+ }
virtual void detach_children(NodeHandler &) override {}
};
@@ -197,6 +200,7 @@ public:
const Node &child() const { return *_child; }
virtual size_t num_children() const override { return _child ? 1 : 0; }
virtual const Node &get_child(size_t idx) const override {
+ (void) idx;
assert(idx == 0);
return child();
}
@@ -223,6 +227,7 @@ public:
const Node &child() const { return *_child; }
virtual size_t num_children() const override { return _child ? 1 : 0; }
virtual const Node &get_child(size_t idx) const override {
+ (void) idx;
assert(idx == 0);
return child();
}
diff --git a/vespalib/src/vespa/vespalib/eval/simple_tensor.cpp b/vespalib/src/vespa/vespalib/eval/simple_tensor.cpp
index 4f3052b4424..dce92698437 100644
--- a/vespalib/src/vespa/vespalib/eval/simple_tensor.cpp
+++ b/vespalib/src/vespa/vespalib/eval/simple_tensor.cpp
@@ -19,6 +19,7 @@ using CellRef = std::reference_wrapper<const Cell>;
namespace {
void assert_type(const ValueType &type) {
+ (void) type;
assert(!type.is_abstract());
assert(type.is_double() || type.is_tensor());
}
diff --git a/vespalib/src/vespa/vespalib/eval/tensor_nodes.h b/vespalib/src/vespa/vespalib/eval/tensor_nodes.h
index 58a1da56cca..a8368c7eec3 100644
--- a/vespalib/src/vespa/vespalib/eval/tensor_nodes.h
+++ b/vespalib/src/vespa/vespalib/eval/tensor_nodes.h
@@ -34,6 +34,7 @@ public:
virtual void accept(NodeVisitor &visitor) const;
virtual size_t num_children() const { return 1; }
virtual const Node &get_child(size_t idx) const {
+ (void) idx;
assert(idx == 0);
return *_child;
}
@@ -62,6 +63,7 @@ public:
virtual void accept(NodeVisitor &visitor) const;
virtual size_t num_children() const { return 1; }
virtual const Node &get_child(size_t idx) const {
+ (void) idx;
assert(idx == 0);
return *_child;
}
diff --git a/vespalib/src/vespa/vespalib/hwaccelrated/iaccelrated.cpp b/vespalib/src/vespa/vespalib/hwaccelrated/iaccelrated.cpp
index aede024f5af..828d64e7a2e 100644
--- a/vespalib/src/vespa/vespalib/hwaccelrated/iaccelrated.cpp
+++ b/vespalib/src/vespa/vespalib/hwaccelrated/iaccelrated.cpp
@@ -60,7 +60,10 @@ void verifyAccelrator(const IAccelrated & accel)
sum += i*i;
}
T hwComputedSum(accel.dotProduct(&a[j], &b[j], testLength - j));
- assert(sum == hwComputedSum);
+ if (sum != hwComputedSum) {
+ fprintf(stderr, "Accelrator is not computing dotproduct correctly.\n");
+ abort();
+ }
}
delete [] a;
delete [] b;
diff --git a/vespalib/src/vespa/vespalib/tensor/dense/mutable_dense_tensor_view.h b/vespalib/src/vespa/vespalib/tensor/dense/mutable_dense_tensor_view.h
index c13fc5a1665..478650c190f 100644
--- a/vespalib/src/vespa/vespalib/tensor/dense/mutable_dense_tensor_view.h
+++ b/vespalib/src/vespa/vespalib/tensor/dense/mutable_dense_tensor_view.h
@@ -28,6 +28,7 @@ private:
*unboundDimSize = *unboundDimSizePtr++;
}
assert(unboundDimSizePtr == unboundDimSizeEnd);
+ (void) unboundDimSizeEnd;
}
void setUnboundDimensionsForEmptyTensor() {
for (auto unboundDimSize : _unboundDimSizes) {
diff --git a/vespalib/src/vespa/vespalib/tensor/serialization/typed_binary_format.cpp b/vespalib/src/vespa/vespalib/tensor/serialization/typed_binary_format.cpp
index c282a20fe6e..b7f225c2ba2 100644
--- a/vespalib/src/vespa/vespalib/tensor/serialization/typed_binary_format.cpp
+++ b/vespalib/src/vespa/vespalib/tensor/serialization/typed_binary_format.cpp
@@ -33,6 +33,7 @@ void
TypedBinaryFormat::deserialize(nbostream &stream, TensorBuilder &builder)
{
auto formatId = stream.getInt1_4Bytes();
+ (void) formatId;
assert(formatId == SPARSE_BINARY_FORMAT_TYPE);
SparseBinaryFormat::deserialize(stream, builder);
}
diff --git a/vespalib/src/vespa/vespalib/tensor/sparse/sparse_tensor_builder.cpp b/vespalib/src/vespa/vespalib/tensor/sparse/sparse_tensor_builder.cpp
index 2c022f6f0c2..537da7d8085 100644
--- a/vespalib/src/vespa/vespalib/tensor/sparse/sparse_tensor_builder.cpp
+++ b/vespalib/src/vespa/vespalib/tensor/sparse/sparse_tensor_builder.cpp
@@ -51,6 +51,7 @@ SparseTensorBuilder::define_dimension(const vespalib::string &dimension)
assert(!_type_made);
Dimension res = _dimensionsEnum.size();
auto insres = _dimensionsEnum.insert(std::make_pair(dimension, res));
+ (void) insres;
assert(insres.second);
assert(insres.first->second == res);
assert(_dimensions.size() == res);
diff --git a/vespalib/src/vespa/vespalib/util/alloc.cpp b/vespalib/src/vespa/vespalib/util/alloc.cpp
index e95a9d2d652..5f4c882007b 100644
--- a/vespalib/src/vespa/vespalib/util/alloc.cpp
+++ b/vespalib/src/vespa/vespalib/util/alloc.cpp
@@ -178,6 +178,7 @@ AutoAllocatorsMap createAutoAllocators() {
size_t mmapLimit = pages * MemoryAllocator::HUGEPAGE_SIZE;
MMapLimitAndAlignment key(mmapLimit, alignment);
auto result = map.emplace(key, AutoAllocator::UP(new AutoAllocator(mmapLimit, alignment)));
+ (void) result;
assert( result.second );
}
}
diff --git a/vespalib/src/vespa/vespalib/util/generationhandler.h b/vespalib/src/vespa/vespalib/util/generationhandler.h
index 9a807e79738..b940e2cad5f 100644
--- a/vespalib/src/vespa/vespalib/util/generationhandler.h
+++ b/vespalib/src/vespa/vespalib/util/generationhandler.h
@@ -72,6 +72,7 @@ public:
return nullptr;
} else {
uint32_t oldRefCount = self->_refCount.fetch_add(2);
+ (void) oldRefCount;
assert(valid(oldRefCount));
return self;
}
diff --git a/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.h b/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.h
index a77a373577f..872d8bc9dc8 100644
--- a/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.h
+++ b/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.h
@@ -57,6 +57,7 @@ private:
TaggedTask task;
Worker() : monitor(), pre_guard(0xaaaaaaaa), idle(true), post_guard(0x55555555), task() {}
void verify(bool expect_idle) {
+ (void) expect_idle;
assert(pre_guard == 0xaaaaaaaa);
assert(post_guard == 0x55555555);
assert(idle == expect_idle);