summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-02-25 12:36:14 +0100
committerTor Egge <Tor.Egge@broadpark.no>2019-02-25 12:43:07 +0100
commitae5bc11f30f156eb996b33f426f894384357309a (patch)
tree56f07ee0b83fa061abef507a7e39da2c2e63d16c
parentd3c80d67c20b23b3cff0ed49f0f6fa57bce703df (diff)
Eliminate some gcc 9 warnings.
-rw-r--r--config/src/vespa/config/common/vespa_version.h1
-rw-r--r--document/src/vespa/document/base/globalid.h2
-rw-r--r--document/src/vespa/document/datatype/arraydatatype.h1
-rw-r--r--document/src/vespa/document/update/arithmeticvalueupdate.h2
-rw-r--r--document/src/vespa/document/update/clearvalueupdate.h1
-rw-r--r--documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp2
-rw-r--r--eval/src/vespa/eval/eval/simple_tensor_engine.cpp2
-rw-r--r--eval/src/vespa/eval/tensor/default_tensor_engine.cpp2
-rw-r--r--fastos/src/vespa/fastos/unix_time.h2
-rw-r--r--fsa/src/vespa/fsa/fsa.h2
-rw-r--r--messagebus/src/vespa/messagebus/sequencer.cpp2
-rw-r--r--searchcore/src/tests/proton/flushengine/prepare_restart_flush_strategy/prepare_restart_flush_strategy_test.cpp2
-rw-r--r--searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp2
-rw-r--r--searchlib/src/vespa/searchlib/fef/number_or_object.h3
-rw-r--r--storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.h2
-rw-r--r--vespalib/src/tests/arrayqueue/arrayqueue.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/component/versionspecification.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/component/versionspecification.h1
-rw-r--r--vespalib/src/vespa/vespalib/util/gencnt.h2
-rw-r--r--vespalog/src/vespa/log/log.h4
20 files changed, 29 insertions, 9 deletions
diff --git a/config/src/vespa/config/common/vespa_version.h b/config/src/vespa/config/common/vespa_version.h
index 2ca2ddc858e..d953bec4347 100644
--- a/config/src/vespa/config/common/vespa_version.h
+++ b/config/src/vespa/config/common/vespa_version.h
@@ -14,6 +14,7 @@ public:
static VespaVersion fromString(const vespalib::string & versionString);
static const VespaVersion & getCurrentVersion();
VespaVersion(const VespaVersion & version);
+ VespaVersion &operator=(const VespaVersion &rhs) = default;
const vespalib::string & toString() const;
private:
VespaVersion(const vespalib::string & versionString);
diff --git a/document/src/vespa/document/base/globalid.h b/document/src/vespa/document/base/globalid.h
index dd1d061dbf7..16781145bf0 100644
--- a/document/src/vespa/document/base/globalid.h
+++ b/document/src/vespa/document/base/globalid.h
@@ -89,6 +89,8 @@ public:
*/
explicit GlobalId(const void *gid) { set(gid); }
+ GlobalId(const GlobalId &rhs) = default;
+
/**
* Implements the assignment operator.
*
diff --git a/document/src/vespa/document/datatype/arraydatatype.h b/document/src/vespa/document/datatype/arraydatatype.h
index 55b5af184dd..275878e5dc2 100644
--- a/document/src/vespa/document/datatype/arraydatatype.h
+++ b/document/src/vespa/document/datatype/arraydatatype.h
@@ -27,6 +27,7 @@ public:
void print(std::ostream&, bool verbose, const std::string& indent) const override;
bool operator==(const DataType& other) const override;
ArrayDataType* clone() const override { return new ArrayDataType(*this); }
+ ArrayDataType &operator=(const ArrayDataType &rhs) = default;
void onBuildFieldPath(FieldPath & path, vespalib::stringref remainFieldName) const override;
DECLARE_IDENTIFIABLE(ArrayDataType);
diff --git a/document/src/vespa/document/update/arithmeticvalueupdate.h b/document/src/vespa/document/update/arithmeticvalueupdate.h
index 1f9e33a3c3a..697798a7275 100644
--- a/document/src/vespa/document/update/arithmeticvalueupdate.h
+++ b/document/src/vespa/document/update/arithmeticvalueupdate.h
@@ -55,6 +55,8 @@ public:
_operator(update._operator),
_operand(update._operand) {}
+ ArithmeticValueUpdate &operator=(const ArithmeticValueUpdate &rhs) = default;
+
bool operator==(const ValueUpdate& other) const override;
Operator getOperator() const { return _operator; }
diff --git a/document/src/vespa/document/update/clearvalueupdate.h b/document/src/vespa/document/update/clearvalueupdate.h
index 2ac47deaaf9..49842653e65 100644
--- a/document/src/vespa/document/update/clearvalueupdate.h
+++ b/document/src/vespa/document/update/clearvalueupdate.h
@@ -17,6 +17,7 @@ public:
typedef std::unique_ptr<ClearValueUpdate> UP;
ClearValueUpdate() : ValueUpdate() {}
ClearValueUpdate(const ClearValueUpdate& update) : ValueUpdate(update) {}
+ ClearValueUpdate &operator=(const ClearValueUpdate &rhs) = default;
bool operator==(const ValueUpdate& other) const override;
void checkCompatibility(const Field& field) const override;
diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp b/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp
index c34291c634f..00c16c16fec 100644
--- a/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp
+++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp
@@ -567,7 +567,7 @@ RoutableFactories60::PutDocumentReplyFactory::doDecode(document::ByteBuffer &buf
// Doing an explicit move here to force converting result to an rvalue.
// This is done automatically in GCC >= 5.
- return std::move(reply);
+ return reply;
}
bool
diff --git a/eval/src/vespa/eval/eval/simple_tensor_engine.cpp b/eval/src/vespa/eval/eval/simple_tensor_engine.cpp
index 2b3c5679488..c8c9a82d267 100644
--- a/eval/src/vespa/eval/eval/simple_tensor_engine.cpp
+++ b/eval/src/vespa/eval/eval/simple_tensor_engine.cpp
@@ -49,7 +49,7 @@ const Value &to_value(std::unique_ptr<SimpleTensor> tensor, Stash &stash) {
Value::UP to_value(std::unique_ptr<SimpleTensor> tensor) {
if (tensor->type().is_tensor()) {
- return std::move(tensor);
+ return tensor;
}
if (tensor->type().is_double()) {
return std::make_unique<DoubleValue>(tensor->as_double());
diff --git a/eval/src/vespa/eval/tensor/default_tensor_engine.cpp b/eval/src/vespa/eval/tensor/default_tensor_engine.cpp
index 20296ac5032..554953288e1 100644
--- a/eval/src/vespa/eval/tensor/default_tensor_engine.cpp
+++ b/eval/src/vespa/eval/tensor/default_tensor_engine.cpp
@@ -91,7 +91,7 @@ Value::UP to_value(std::unique_ptr<Tensor> tensor) {
return std::make_unique<ErrorValue>();
}
if (tensor->type().is_tensor()) {
- return std::move(tensor);
+ return tensor;
}
return std::make_unique<DoubleValue>(tensor->as_double());
}
diff --git a/fastos/src/vespa/fastos/unix_time.h b/fastos/src/vespa/fastos/unix_time.h
index adb952f1f68..82254c98f8d 100644
--- a/fastos/src/vespa/fastos/unix_time.h
+++ b/fastos/src/vespa/fastos/unix_time.h
@@ -57,6 +57,8 @@ public:
SetMilliSecs(s * 1000.0);
}
+ FastOS_UNIX_Time(const FastOS_UNIX_Time &rhs) = default;
+
operator fastos::TimeStamp () {
return fastos::TimeStamp(_time);
}
diff --git a/fsa/src/vespa/fsa/fsa.h b/fsa/src/vespa/fsa/fsa.h
index 072dc1de4bd..e4d3246d924 100644
--- a/fsa/src/vespa/fsa/fsa.h
+++ b/fsa/src/vespa/fsa/fsa.h
@@ -124,6 +124,8 @@ public:
_symbol(it._symbol), _state(it._state),
_fsa(it._fsa) {}
+ iteratorItem &operator=(const iteratorItem &rhs) = default;
+
/**
* @brief Destructor.
*/
diff --git a/messagebus/src/vespa/messagebus/sequencer.cpp b/messagebus/src/vespa/messagebus/sequencer.cpp
index 97fa2641504..2d7a36a28ef 100644
--- a/messagebus/src/vespa/messagebus/sequencer.cpp
+++ b/messagebus/src/vespa/messagebus/sequencer.cpp
@@ -51,7 +51,7 @@ Sequencer::filter(Message::UP msg)
}
_seqMap[seqId] = nullptr; // insert empty queue
}
- return std::move(msg);
+ return msg;
}
void
diff --git a/searchcore/src/tests/proton/flushengine/prepare_restart_flush_strategy/prepare_restart_flush_strategy_test.cpp b/searchcore/src/tests/proton/flushengine/prepare_restart_flush_strategy/prepare_restart_flush_strategy_test.cpp
index 6bc7e1b5556..0f55a4c30de 100644
--- a/searchcore/src/tests/proton/flushengine/prepare_restart_flush_strategy/prepare_restart_flush_strategy_test.cpp
+++ b/searchcore/src/tests/proton/flushengine/prepare_restart_flush_strategy/prepare_restart_flush_strategy_test.cpp
@@ -189,7 +189,7 @@ defaultTransactionLogStats()
flushengine::TlsStatsMap::Map result;
result.insert(std::make_pair("handler1", flushengine::TlsStats(1000, 11, 110)));
result.insert(std::make_pair("handler2", flushengine::TlsStats(2000, 11, 110)));
- return std::move(result);
+ return result;
}
struct FlushStrategyFixture
diff --git a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
index 9e75a85d289..84d925e0780 100644
--- a/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
+++ b/searchlib/src/tests/docstore/logdatastore/logdatastore_test.cpp
@@ -1040,7 +1040,7 @@ TEST("require that findIncompleteCompactedFiles does expected filtering") {
EXPECT_TRUE(toRemove.find(FileChunk::NameId(201)) != toRemove.end());
EXPECT_TRUE(toRemove.find(FileChunk::NameId(205)) != toRemove.end());
- EXPECT_EXCEPTION(LogDataStore::findIncompleteCompactedFiles(create({1,3,100,200,201,202,204})).empty(),
+ EXPECT_EXCEPTION((void) LogDataStore::findIncompleteCompactedFiles(create({1,3,100,200,201,202,204})).empty(),
vespalib::IllegalStateException, "3 consecutive files {200, 201, 202}. Impossible");
}
diff --git a/searchlib/src/vespa/searchlib/fef/number_or_object.h b/searchlib/src/vespa/searchlib/fef/number_or_object.h
index 259a1622516..f9fb3d061b4 100644
--- a/searchlib/src/vespa/searchlib/fef/number_or_object.h
+++ b/searchlib/src/vespa/searchlib/fef/number_or_object.h
@@ -16,7 +16,8 @@ namespace search::fef {
union NumberOrObject {
feature_t as_number;
vespalib::eval::Value::CREF as_object;
- NumberOrObject() { memset(this, 0, sizeof(NumberOrObject)); }
+ char as_bytes[std::max(sizeof(as_number), sizeof(as_object))];
+ NumberOrObject() { memset(as_bytes, 0, sizeof(as_bytes)); }
~NumberOrObject() {}
};
diff --git a/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.h b/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.h
index 07b9e2a48a6..6e15ee03d12 100644
--- a/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.h
+++ b/storage/src/vespa/storage/distributor/bucketdb/bucketdbmetricupdater.h
@@ -30,6 +30,8 @@ public:
Stats(const Stats &rhs);
~Stats() { }
+ Stats &operator=(const Stats &rhs) = default;
+
/**
* For each node N, look at all the buckets that have or should have a
* bucket copy on that node. For each of these buckets, there is a
diff --git a/vespalib/src/tests/arrayqueue/arrayqueue.cpp b/vespalib/src/tests/arrayqueue/arrayqueue.cpp
index cb1857a0594..5178da30eca 100644
--- a/vespalib/src/tests/arrayqueue/arrayqueue.cpp
+++ b/vespalib/src/tests/arrayqueue/arrayqueue.cpp
@@ -25,6 +25,7 @@ struct Int
++ctorCnt;
++aliveCnt;
}
+ Int &operator=(const Int &rhs) = default;
operator int() const { return value; }
~Int() {
++dtorCnt;
diff --git a/vespalib/src/vespa/vespalib/component/versionspecification.cpp b/vespalib/src/vespa/vespalib/component/versionspecification.cpp
index 84cf446e8c5..6400097c9bf 100644
--- a/vespalib/src/vespa/vespalib/component/versionspecification.cpp
+++ b/vespalib/src/vespa/vespalib/component/versionspecification.cpp
@@ -24,6 +24,8 @@ VersionSpecification::VersionSpecification(const VersionSpecification &) = defau
VersionSpecification::~VersionSpecification() = default;
+VersionSpecification &VersionSpecification::operator=(const VersionSpecification &rhs) = default;
+
void
VersionSpecification::initialize()
{
diff --git a/vespalib/src/vespa/vespalib/component/versionspecification.h b/vespalib/src/vespa/vespalib/component/versionspecification.h
index 399db123a7a..88d825011f3 100644
--- a/vespalib/src/vespa/vespalib/component/versionspecification.h
+++ b/vespalib/src/vespa/vespalib/component/versionspecification.h
@@ -70,6 +70,7 @@ public:
VersionSpecification(const VersionSpecification &);
~VersionSpecification();
+ VersionSpecification &operator=(const VersionSpecification &rhs);
/**
* @brief Creates a version specification from the specified string.
*
diff --git a/vespalib/src/vespa/vespalib/util/gencnt.h b/vespalib/src/vespa/vespalib/util/gencnt.h
index 43e127c242e..7bfc5a7e49b 100644
--- a/vespalib/src/vespa/vespalib/util/gencnt.h
+++ b/vespalib/src/vespa/vespalib/util/gencnt.h
@@ -31,6 +31,8 @@ public:
**/
GenCnt(uint32_t val) : _val(val) {}
+ GenCnt(const GenCnt &rhs) = default;
+
/**
* @brief empty destructor
**/
diff --git a/vespalog/src/vespa/log/log.h b/vespalog/src/vespa/log/log.h
index 20a4b425d72..4bb13f7d791 100644
--- a/vespalog/src/vespa/log/log.h
+++ b/vespalog/src/vespa/log/log.h
@@ -25,7 +25,7 @@ static ns_log::Logger logger(__VA_ARGS__)
static ns_log::Logger *logger=NULL; \
static bool logInitialised = false; \
static const char *logName = x; \
-static const char *rcsId = id
+static const char *indirectRcsId = id
#define LOG_RCSID(x) \
@@ -55,7 +55,7 @@ do { \
if (!logInitialised) { \
logInitialised = true; \
logger = static_cast<Logger *>(malloc(sizeof *logger)); \
- new (logger) Logger(logName, rcsId); \
+ new (logger) Logger(logName, indirectRcsId); \
}
#define LOG_INDIRECT(level, ...) \
do { \