summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--storage/src/vespa/storage/persistence/mergehandler.cpp2
-rw-r--r--vespalib/src/tests/dotproduct/dotproductbenchmark.cpp5
-rw-r--r--vespalog/src/vespa/log/log.cpp2
-rw-r--r--vespamalloc/src/tests/allocfree/linklist.cpp2
4 files changed, 6 insertions, 5 deletions
diff --git a/storage/src/vespa/storage/persistence/mergehandler.cpp b/storage/src/vespa/storage/persistence/mergehandler.cpp
index 004a6a798a9..539e5cf9dcc 100644
--- a/storage/src/vespa/storage/persistence/mergehandler.cpp
+++ b/storage/src/vespa/storage/persistence/mergehandler.cpp
@@ -649,14 +649,12 @@ namespace {
void findCandidates(MergeStatus& status, uint16_t active_nodes_mask, bool constrictHasMask, uint16_t hasMask,
uint16_t newHasMask, api::ApplyBucketDiffCommand& cmd)
{
- uint32_t chunkSize = 0;
for (const auto& entry : status.diff) {
uint16_t entry_has_mask = (entry._hasMask & active_nodes_mask);
if ((entry_has_mask == 0u) ||
(constrictHasMask && (entry_has_mask != hasMask))) {
continue;
}
- chunkSize += entry._bodySize + entry._headerSize;
cmd.getDiff().emplace_back(entry);
if (constrictHasMask) {
cmd.getDiff().back()._entry._hasMask = newHasMask;
diff --git a/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp b/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp
index e95e8a5c58b..5d7817bc59b 100644
--- a/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp
+++ b/vespalib/src/tests/dotproduct/dotproductbenchmark.cpp
@@ -5,6 +5,7 @@
#include <iostream>
#include <vector>
#include <thread>
+#include <functional>
using namespace vespalib;
using vespalib::hwaccelrated::IAccelrated;
@@ -106,6 +107,8 @@ SparseBenchmark::SparseBenchmark(size_t numDocs, size_t numValues, size_t numQue
}
SparseBenchmark::~SparseBenchmark() = default;
+std::function<void(int)> use_sum = [](int) noexcept { };
+
class UnorderedSparseBenchmark : public SparseBenchmark
{
private:
@@ -124,6 +127,7 @@ private:
sum += static_cast<int64_t>(_values[offset + i]._value) * it->second;
}
}
+ use_sum(sum);
}
map _query;
};
@@ -154,6 +158,7 @@ private:
sum += static_cast<int64_t>(_values[offset + b]._value) * _query[a]._value;
}
}
+ use_sum(sum);
}
std::vector<P> _query;
};
diff --git a/vespalog/src/vespa/log/log.cpp b/vespalog/src/vespa/log/log.cpp
index 47f7377ac4d..2b49d7e5031 100644
--- a/vespalog/src/vespa/log/log.cpp
+++ b/vespalog/src/vespa/log/log.cpp
@@ -102,11 +102,9 @@ Logger::setTarget()
void
Logger::ensurePrefix(const char *name)
{
- const char *start = name;
if (name[0] != '\0' && name[0] != '.') {
const char *end = strchr(name, '.');
int len = end ? end - name : strlen(name);
- start += len;
if (_prefix[0]) {
// Make sure the prefix already set is identical to this one
diff --git a/vespamalloc/src/tests/allocfree/linklist.cpp b/vespamalloc/src/tests/allocfree/linklist.cpp
index af44ec3430b..516a3f6cf55 100644
--- a/vespamalloc/src/tests/allocfree/linklist.cpp
+++ b/vespamalloc/src/tests/allocfree/linklist.cpp
@@ -39,7 +39,7 @@ public:
size_t size() const { return 0; }
bool allocated() const { return false; }
int threadId() const { return 0; }
- void info(FILE *, unsigned level=0) const { level = 0; }
+ void info(FILE *, unsigned level=0) const { (void) level; }
Stack * callStack() { return NULL; }
size_t callStackLen() const { return 0; }