summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-02-10 15:22:24 +0100
committerTor Egge <Tor.Egge@broadpark.no>2019-02-10 15:22:24 +0100
commitc7479b58a7302088f0c01708fba68ad47fcc7d76 (patch)
treed72c8a8534147a947f82f3cb99c9147d0547c85d /storage
parent74d98e665d9844983e104de95958715ed3e5a592 (diff)
Eliminate some clang warnings in storage.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/tests/bucketdb/lockablemaptest.cpp27
-rw-r--r--storage/src/tests/distributor/putoperationtest.cpp1
-rw-r--r--storage/src/tests/persistence/filestorage/deactivatebucketstest.cpp1
-rw-r--r--storage/src/vespa/storage/bucketmover/htmltable.h3
-rw-r--r--storage/src/vespa/storage/bucketmover/run.h1
-rw-r--r--storage/src/vespa/storage/distributor/bucketdbupdater.h4
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/statbucketoperation.cpp3
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/statbucketoperation.h1
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp5
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h1
-rw-r--r--storage/src/vespa/storage/storageserver/documentapiconverter.cpp6
-rw-r--r--storage/src/vespa/storage/visiting/visitor.cpp2
-rw-r--r--storage/src/vespa/storage/visiting/visitor.h1
13 files changed, 8 insertions, 48 deletions
diff --git a/storage/src/tests/bucketdb/lockablemaptest.cpp b/storage/src/tests/bucketdb/lockablemaptest.cpp
index c94121062ec..10f806f2e97 100644
--- a/storage/src/tests/bucketdb/lockablemaptest.cpp
+++ b/storage/src/tests/bucketdb/lockablemaptest.cpp
@@ -115,7 +115,6 @@ namespace {
void
LockableMapTest::testSimpleUsage() {
// Tests insert, erase, size, empty, operator[]
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
// Do some insertions
CPPUNIT_ASSERT(map.empty());
@@ -154,7 +153,6 @@ LockableMapTest::testSimpleUsage() {
void
LockableMapTest::testComparison() {
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map1;
Map map2;
bool preExisted;
@@ -579,7 +577,6 @@ printBuckets(const std::map<document::BucketId, Map::WrappedEntry>& results) {
void
LockableMapTest::testFindBucketsSimple() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(17, 0x0ffff);
@@ -608,7 +605,6 @@ LockableMapTest::testFindBucketsSimple() {
void
LockableMapTest::testFindBuckets() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x0ffff);
@@ -637,7 +633,6 @@ LockableMapTest::testFindBuckets() {
void
LockableMapTest::testFindBuckets2() { // ticket 3121525
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x0ffff);
@@ -666,7 +661,6 @@ LockableMapTest::testFindBuckets2() { // ticket 3121525
void
LockableMapTest::testFindBuckets3() { // ticket 3121525
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x0ffff);
@@ -689,7 +683,6 @@ LockableMapTest::testFindBuckets3() { // ticket 3121525
void
LockableMapTest::testFindBuckets4() { // ticket 3121525
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x0ffff);
@@ -714,7 +707,6 @@ LockableMapTest::testFindBuckets4() { // ticket 3121525
void
LockableMapTest::testFindBuckets5() { // ticket 3121525
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x0ffff);
@@ -739,7 +731,6 @@ LockableMapTest::testFindBuckets5() { // ticket 3121525
void
LockableMapTest::testFindNoBuckets() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id(16, 0x0ffff);
@@ -753,7 +744,6 @@ LockableMapTest::testFindNoBuckets() {
void
LockableMapTest::testFindAll() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x0aaaa); // contains id2-id7
@@ -815,7 +805,6 @@ LockableMapTest::testFindAll() {
void
LockableMapTest::testFindAll2() { // Ticket 3121525
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(17, 0x00001);
@@ -839,7 +828,6 @@ LockableMapTest::testFindAll2() { // Ticket 3121525
void
LockableMapTest::testFindAllUnusedBitIsSet() { // ticket 2938896
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(24, 0x000dc7089);
@@ -868,7 +856,6 @@ LockableMapTest::testFindAllUnusedBitIsSet() { // ticket 2938896
void
LockableMapTest::testFindAllInconsistentlySplit() { // Ticket 2938896
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x00001); // contains id2-id3
@@ -895,7 +882,6 @@ LockableMapTest::testFindAllInconsistentlySplit() { // Ticket 2938896
void
LockableMapTest::testFindAllInconsistentlySplit2() { // ticket 3121525
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(17, 0x10000);
@@ -923,7 +909,6 @@ LockableMapTest::testFindAllInconsistentlySplit2() { // ticket 3121525
void
LockableMapTest::testFindAllInconsistentlySplit3() { // ticket 3121525
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x0ffff); // contains id2
@@ -946,7 +931,6 @@ LockableMapTest::testFindAllInconsistentlySplit3() { // ticket 3121525
void
LockableMapTest::testFindAllInconsistentlySplit4() { // ticket 3121525
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x0ffff); // contains id2-id3
@@ -972,7 +956,6 @@ LockableMapTest::testFindAllInconsistentlySplit4() { // ticket 3121525
void
LockableMapTest::testFindAllInconsistentlySplit5() { // ticket 3121525
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x0ffff); // contains id2-id3
@@ -997,7 +980,6 @@ LockableMapTest::testFindAllInconsistentlySplit5() { // ticket 3121525
void
LockableMapTest::testFindAllInconsistentlySplit6() {
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x0ffff); // contains id2-id3
@@ -1022,7 +1004,6 @@ LockableMapTest::testFindAllInconsistentlySplit6() {
void
LockableMapTest::testFindAllInconsistentBelow16Bits()
{
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(1, 0x1); // contains id2-id3
@@ -1048,7 +1029,6 @@ LockableMapTest::testFindAllInconsistentBelow16Bits()
void
LockableMapTest::testCreate() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
{
document::BucketId id1(58, 0x43d6c878000004d2ull);
@@ -1081,7 +1061,6 @@ LockableMapTest::testCreate() {
void
LockableMapTest::testCreate2() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
{
document::BucketId id1(58, 0xeaf77782000004d2);
@@ -1108,7 +1087,6 @@ LockableMapTest::testCreate2() {
void
LockableMapTest::testCreate3() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
{
document::BucketId id1(58, 0xeaf77780000004d2);
@@ -1137,7 +1115,6 @@ LockableMapTest::testCreate3() {
void
LockableMapTest::testCreate4() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
{
document::BucketId id1(16, 0x00000000000004d1);
@@ -1162,7 +1139,6 @@ LockableMapTest::testCreate4() {
void
LockableMapTest::testCreate6() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
{
document::BucketId id1(0x8c000000000004d2);
@@ -1199,7 +1175,6 @@ LockableMapTest::testCreate6() {
void
LockableMapTest::testCreate5() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
{
document::BucketId id1(58, 0xeaf77780000004d2);
@@ -1224,7 +1199,6 @@ LockableMapTest::testCreate5() {
void
LockableMapTest::testCreateEmpty() {
#if __WORDSIZE == 64
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
{
document::BucketId id1(58, 0x00000000010004d2);
@@ -1238,7 +1212,6 @@ LockableMapTest::testCreateEmpty() {
void
LockableMapTest::testIsConsistent()
{
- typedef LockableMap<JudyMultiMap<A> > Map;
Map map;
document::BucketId id1(16, 0x00001); // contains id2-id3
document::BucketId id2(17, 0x00001);
diff --git a/storage/src/tests/distributor/putoperationtest.cpp b/storage/src/tests/distributor/putoperationtest.cpp
index 5551d0a5010..aa5fd80df91 100644
--- a/storage/src/tests/distributor/putoperationtest.cpp
+++ b/storage/src/tests/distributor/putoperationtest.cpp
@@ -209,7 +209,6 @@ PutOperationTest::testBucketDatabaseGetsSpecialEntryWhenCreateBucketSent()
setupDistributor(2, 1, "storage:1 distributor:1");
Document::SP doc(createDummyDocument("test", "test"));
- document::BucketId bucketId(getExternalOperationHandler().getBucketId(doc->getId()));
sendPut(createPut(doc));
// Database updated before CreateBucket is sent
diff --git a/storage/src/tests/persistence/filestorage/deactivatebucketstest.cpp b/storage/src/tests/persistence/filestorage/deactivatebucketstest.cpp
index 4656924c1b6..f9375790ebb 100644
--- a/storage/src/tests/persistence/filestorage/deactivatebucketstest.cpp
+++ b/storage/src/tests/persistence/filestorage/deactivatebucketstest.cpp
@@ -44,7 +44,6 @@ DeactivateBucketsTest::bucketsInDatabaseDeactivatedWhenNodeDownInClusterState()
lib::ClusterState::CSP(new lib::ClusterState(upState)));
document::BucketId bucket(8, 123);
- spi::Bucket spiBucket(makeSpiBucket(bucket));
createBucket(bucket);
api::BucketInfo serviceLayerInfo(1, 2, 3, 4, 5, true, true);
diff --git a/storage/src/vespa/storage/bucketmover/htmltable.h b/storage/src/vespa/storage/bucketmover/htmltable.h
index c032c15ee02..85e9438edcb 100644
--- a/storage/src/vespa/storage/bucketmover/htmltable.h
+++ b/storage/src/vespa/storage/bucketmover/htmltable.h
@@ -47,8 +47,7 @@ struct Column {
}
out << ">";
}
- virtual void printElementStop(std::ostream& out, uint16_t row) {
- std::map<uint16_t, Color>::iterator color(_colors.find(row));
+ virtual void printElementStop(std::ostream& out, [[maybe_unused]] uint16_t row) {
out << "</td>";
}
diff --git a/storage/src/vespa/storage/bucketmover/run.h b/storage/src/vespa/storage/bucketmover/run.h
index eb7a6df2d17..914781eec30 100644
--- a/storage/src/vespa/storage/bucketmover/run.h
+++ b/storage/src/vespa/storage/bucketmover/run.h
@@ -38,7 +38,6 @@ class Run : public document::Printable {
std::shared_ptr<const lib::Distribution> _distribution;
lib::NodeState _nodeState;
uint16_t _nodeIndex;
- uint32_t _maxEntriesToKeep;
std::list<Move> _entries;
std::list<Move> _pending;
bool _iterationDone;
diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.h b/storage/src/vespa/storage/distributor/bucketdbupdater.h
index 89c5000b542..ea67e7ea72a 100644
--- a/storage/src/vespa/storage/distributor/bucketdbupdater.h
+++ b/storage/src/vespa/storage/distributor/bucketdbupdater.h
@@ -191,13 +191,12 @@ private:
public:
NodeRemover(const lib::ClusterState& oldState,
const lib::ClusterState& s,
- const document::BucketIdFactory& factory,
+ [[maybe_unused]] const document::BucketIdFactory& factory,
uint16_t localIndex,
const lib::Distribution& distribution,
const char* upStates)
: _oldState(oldState),
_state(s),
- _factory(factory),
_localIndex(localIndex),
_distribution(distribution),
_upStates(upStates) {}
@@ -218,7 +217,6 @@ private:
const lib::ClusterState _state;
std::vector<document::BucketId> _removedBuckets;
- const document::BucketIdFactory& _factory;
uint16_t _localIndex;
const lib::Distribution& _distribution;
const char* _upStates;
diff --git a/storage/src/vespa/storage/distributor/operations/external/statbucketoperation.cpp b/storage/src/vespa/storage/distributor/operations/external/statbucketoperation.cpp
index 4e2f8a3169a..8e6494a588d 100644
--- a/storage/src/vespa/storage/distributor/operations/external/statbucketoperation.cpp
+++ b/storage/src/vespa/storage/distributor/operations/external/statbucketoperation.cpp
@@ -12,11 +12,10 @@ namespace storage {
namespace distributor {
StatBucketOperation::StatBucketOperation(
- DistributorComponent& manager,
+ [[maybe_unused]] DistributorComponent& manager,
DistributorBucketSpace &bucketSpace,
const std::shared_ptr<api::StatBucketCommand> & cmd)
: Operation(),
- _manager(manager),
_bucketSpace(bucketSpace),
_command(cmd)
{
diff --git a/storage/src/vespa/storage/distributor/operations/external/statbucketoperation.h b/storage/src/vespa/storage/distributor/operations/external/statbucketoperation.h
index d40924e23f0..914e104943a 100644
--- a/storage/src/vespa/storage/distributor/operations/external/statbucketoperation.h
+++ b/storage/src/vespa/storage/distributor/operations/external/statbucketoperation.h
@@ -30,7 +30,6 @@ public:
void onStart(DistributorMessageSender& sender) override;
void onReceive(DistributorMessageSender& sender, const std::shared_ptr<api::StorageReply> & msg) override;
private:
- DistributorComponent& _manager;
DistributorBucketSpace &_bucketSpace;
std::shared_ptr<api::StatBucketCommand> _command;
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
index 3ccb35ef5a7..d7207f43c7b 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -23,10 +23,9 @@ using document::BucketSpace;
namespace storage {
FileStorHandlerImpl::FileStorHandlerImpl(uint32_t numStripes, MessageSender& sender, FileStorMetrics& metrics,
- const spi::PartitionStateList& partitions,
+ [[maybe_unused]] const spi::PartitionStateList& partitions,
ServiceLayerComponentRegister& compReg)
- : _partitions(partitions),
- _component(compReg, "filestorhandlerimpl"),
+ : _component(compReg, "filestorhandlerimpl"),
_diskInfo(),
_messageSender(sender),
_bucketIdFactory(_component.getBucketIdFactory()),
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h
index fe9982018b9..390b7284b85 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.h
@@ -282,7 +282,6 @@ public:
void abortQueuedOperations(const AbortBucketOperationsCommand& cmd);
private:
- const spi::PartitionStateList& _partitions;
ServiceLayerComponent _component;
std::vector<Disk> _diskInfo;
MessageSender& _messageSender;
diff --git a/storage/src/vespa/storage/storageserver/documentapiconverter.cpp b/storage/src/vespa/storage/storageserver/documentapiconverter.cpp
index b6ac2a4b219..f9deb76c3e2 100644
--- a/storage/src/vespa/storage/storageserver/documentapiconverter.cpp
+++ b/storage/src/vespa/storage/storageserver/documentapiconverter.cpp
@@ -152,7 +152,7 @@ DocumentApiConverter::toStorageAPI(documentapi::DocumentMessage& fromMsg)
toMsg->toString().c_str(), toMsg->getLoadType().getId(),
fromMsg.getPriority(), toMsg->getPriority());
}
- return std::move(toMsg);
+ return toMsg;
}
std::unique_ptr<api::StorageReply>
@@ -195,7 +195,7 @@ DocumentApiConverter::toStorageAPI(documentapi::DocumentReply& fromReply,
toMsg->setPriority(_priConverter->toStoragePriority(fromReply.getPriority()));
}
}
- return std::move(toMsg);
+ return toMsg;
}
std::unique_ptr<mbus::Message>
@@ -318,7 +318,7 @@ DocumentApiConverter::toDocumentAPI(api::StorageCommand& fromMsg)
toMsg->getTrace().setLevel(9);
}
}
- return std::move(toMsg);
+ return toMsg;
}
void
diff --git a/storage/src/vespa/storage/visiting/visitor.cpp b/storage/src/vespa/storage/visiting/visitor.cpp
index 60b94b6b33e..9e927a24d9c 100644
--- a/storage/src/vespa/storage/visiting/visitor.cpp
+++ b/storage/src/vespa/storage/visiting/visitor.cpp
@@ -1105,8 +1105,6 @@ Visitor::getStatus(std::ostream& out, bool verbose) const
out << "</table>\n";
out << "<h4>Buckets to visit</h4>";
- typedef std::pair<api::Timestamp, api::Timestamp> TimePair;
- TimePair lastTime;
for (uint32_t i=0; i<_buckets.size(); ++i) {
out << _buckets[i] << "\n<br>";
}
diff --git a/storage/src/vespa/storage/visiting/visitor.h b/storage/src/vespa/storage/visiting/visitor.h
index f8da49202ad..c8d34139364 100644
--- a/storage/src/vespa/storage/visiting/visitor.h
+++ b/storage/src/vespa/storage/visiting/visitor.h
@@ -105,7 +105,6 @@ public:
uint32_t _secondPassHits;
uint64_t _secondPassBytes;
const document::OrderingSpecification* _ordering;
- bool _allowFirstPass;
};
enum VisitorState