diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-05-02 14:41:55 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-05-02 14:41:55 +0200 |
commit | 4818b68d55db6aab2424dfa97d6e25d78359589d (patch) | |
tree | cbc576f919ceda8e5914d231e34f9c8e4c3126aa /messagebus | |
parent | 0f646f10b377b90fc37e9911f9fe383d112ff157 (diff) |
Fix warnings hidden earlier due to including application headers as system includes
Diffstat (limited to 'messagebus')
22 files changed, 56 insertions, 24 deletions
diff --git a/messagebus/src/tests/messagebus/messagebus.cpp b/messagebus/src/tests/messagebus/messagebus.cpp index 25d0ed51711..8d8058f4ce2 100644 --- a/messagebus/src/tests/messagebus/messagebus.cpp +++ b/messagebus/src/tests/messagebus/messagebus.cpp @@ -117,6 +117,8 @@ private: std::vector<Search*> searchVec; public: + Test(); + ~Test(); int Main() override; void testSendToAny(); void testSendToCol(); @@ -137,6 +139,9 @@ private: TEST_APPHOOK(Test); +Test::Test() {} +Test::~Test() {} + int Test::Main() { diff --git a/messagebus/src/tests/oos/oos.cpp b/messagebus/src/tests/oos/oos.cpp index dc224a1519c..dd6459ce4a5 100644 --- a/messagebus/src/tests/oos/oos.cpp +++ b/messagebus/src/tests/oos/oos.cpp @@ -43,6 +43,7 @@ private: public: Test(); + ~Test(); int Main() override; }; @@ -51,10 +52,9 @@ TEST_APPHOOK(Test); Test::Test() : _session(), _handler() -{ - // empty -} +{} +Test::~Test() {} bool Test::checkError(const string &dst, uint32_t error) { diff --git a/messagebus/src/vespa/messagebus/network/identity.cpp b/messagebus/src/vespa/messagebus/network/identity.cpp index ea2b3feb6cb..b5f15c7b484 100644 --- a/messagebus/src/vespa/messagebus/network/identity.cpp +++ b/messagebus/src/vespa/messagebus/network/identity.cpp @@ -12,6 +12,8 @@ Identity::Identity(const string &configId) : _hostname = vespalib::HostName::get(); } +Identity::~Identity() {} + std::vector<string> Identity::split(const string &name) { diff --git a/messagebus/src/vespa/messagebus/network/identity.h b/messagebus/src/vespa/messagebus/network/identity.h index f93a68bd781..40a83d12a31 100644 --- a/messagebus/src/vespa/messagebus/network/identity.h +++ b/messagebus/src/vespa/messagebus/network/identity.h @@ -30,6 +30,7 @@ public: * @param configId application config id **/ Identity(const string &configId); + ~Identity(); /** * Obtain the hostname held by this object. @@ -55,4 +56,3 @@ public: }; } // namespace mbus - diff --git a/messagebus/src/vespa/messagebus/network/rpcnetworkparams.cpp b/messagebus/src/vespa/messagebus/network/rpcnetworkparams.cpp index d4bfe6324b9..64675407cc7 100644 --- a/messagebus/src/vespa/messagebus/network/rpcnetworkparams.cpp +++ b/messagebus/src/vespa/messagebus/network/rpcnetworkparams.cpp @@ -1,7 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include "rpcnetworkparams.h" -#include <vespa/slobrok/cfg.h> +#include "rpcnetworkparams.h" namespace mbus { @@ -15,5 +14,7 @@ RPCNetworkParams::RPCNetworkParams() : _connectionExpireSecs(30) { } +RPCNetworkParams::~RPCNetworkParams() {} + } diff --git a/messagebus/src/vespa/messagebus/network/rpcnetworkparams.h b/messagebus/src/vespa/messagebus/network/rpcnetworkparams.h index 8d9d4066177..a568dc1b27e 100644 --- a/messagebus/src/vespa/messagebus/network/rpcnetworkparams.h +++ b/messagebus/src/vespa/messagebus/network/rpcnetworkparams.h @@ -1,7 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <stdint.h> #include "identity.h" #include <vespa/slobrok/cfg.h> @@ -22,10 +21,8 @@ private: double _connectionExpireSecs; public: - /** - * Constructs a new parameter object with default values. - */ RPCNetworkParams(); + ~RPCNetworkParams(); /** * Returns the identity to use for the network. diff --git a/messagebus/src/vespa/messagebus/network/rpcservice.cpp b/messagebus/src/vespa/messagebus/network/rpcservice.cpp index ae098da45fb..7adfcdeedf4 100644 --- a/messagebus/src/vespa/messagebus/network/rpcservice.cpp +++ b/messagebus/src/vespa/messagebus/network/rpcservice.cpp @@ -1,7 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include "rpcservice.h" -#include "rpcserviceaddress.h" #include "rpcnetwork.h" namespace mbus { @@ -15,6 +14,8 @@ RPCService::RPCService(const Mirror &mirror, _addressList() { } +RPCService::~RPCService() {} + RPCServiceAddress::UP RPCService::resolve() { diff --git a/messagebus/src/vespa/messagebus/network/rpcservice.h b/messagebus/src/vespa/messagebus/network/rpcservice.h index 5b5afb1c704..5adf84c9f3d 100644 --- a/messagebus/src/vespa/messagebus/network/rpcservice.h +++ b/messagebus/src/vespa/messagebus/network/rpcservice.h @@ -1,8 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vespa/slobrok/imirrorapi.h> #include "rpcserviceaddress.h" +#include <vespa/slobrok/imirrorapi.h> namespace mbus { @@ -36,6 +36,7 @@ public: * @param pattern The pattern to use when querying. */ RPCService(const Mirror &mirror, const string &pattern); + ~RPCService(); /** * Resolve a concrete address from this service. This service may represent @@ -55,4 +56,3 @@ public: }; } // namespace mbus - diff --git a/messagebus/src/vespa/messagebus/network/rpcserviceaddress.cpp b/messagebus/src/vespa/messagebus/network/rpcserviceaddress.cpp index 42fe3132703..cc094fc2458 100644 --- a/messagebus/src/vespa/messagebus/network/rpcserviceaddress.cpp +++ b/messagebus/src/vespa/messagebus/network/rpcserviceaddress.cpp @@ -16,6 +16,8 @@ RPCServiceAddress::RPCServiceAddress(const string &serviceName, } } +RPCServiceAddress::~RPCServiceAddress() {} + bool RPCServiceAddress::isMalformed() { diff --git a/messagebus/src/vespa/messagebus/network/rpcserviceaddress.h b/messagebus/src/vespa/messagebus/network/rpcserviceaddress.h index 0a923eda0c1..c65d216f782 100644 --- a/messagebus/src/vespa/messagebus/network/rpcserviceaddress.h +++ b/messagebus/src/vespa/messagebus/network/rpcserviceaddress.h @@ -34,6 +34,7 @@ public: */ RPCServiceAddress(const string &serviceName, const string &connectionSpec); + ~RPCServiceAddress(); /** * Returns whether or not this service address is malformed. diff --git a/messagebus/src/vespa/messagebus/result.cpp b/messagebus/src/vespa/messagebus/result.cpp index 259fe25498f..915aa342251 100644 --- a/messagebus/src/vespa/messagebus/result.cpp +++ b/messagebus/src/vespa/messagebus/result.cpp @@ -34,6 +34,8 @@ Result::Result(const Handover &rhs) _msg(rhs._msg) { } +Result::~Result() {} + bool Result::isAccepted() const { diff --git a/messagebus/src/vespa/messagebus/result.h b/messagebus/src/vespa/messagebus/result.h index 02f4ba1e838..ec786aeccf7 100644 --- a/messagebus/src/vespa/messagebus/result.h +++ b/messagebus/src/vespa/messagebus/result.h @@ -2,7 +2,6 @@ #pragma once -#include <memory> #include "error.h" #include "message.h" @@ -72,6 +71,8 @@ public: **/ Result(const Handover &rhs); + ~Result(); + /** * Check if the message was accepted. * diff --git a/messagebus/src/vespa/messagebus/routing/hopspec.cpp b/messagebus/src/vespa/messagebus/routing/hopspec.cpp index 1f8e7937242..6e1d2e4d939 100644 --- a/messagebus/src/vespa/messagebus/routing/hopspec.cpp +++ b/messagebus/src/vespa/messagebus/routing/hopspec.cpp @@ -1,6 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/vespalib/util/stringfmt.h> + #include "routingspec.h" +#include <vespa/vespalib/util/stringfmt.h> namespace mbus { @@ -11,6 +12,8 @@ HopSpec::HopSpec(const string &name, const string &selector) : _ignoreResult(false) { } +HopSpec::~HopSpec() {} + HopSpec & HopSpec::addRecipients(const std::vector<string> &recipients) { diff --git a/messagebus/src/vespa/messagebus/routing/hopspec.h b/messagebus/src/vespa/messagebus/routing/hopspec.h index 3bb40847569..a73f7ca8b42 100644 --- a/messagebus/src/vespa/messagebus/routing/hopspec.h +++ b/messagebus/src/vespa/messagebus/routing/hopspec.h @@ -1,8 +1,8 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <vector> #include <vespa/messagebus/common.h> +#include <vector> namespace mbus { @@ -31,6 +31,7 @@ public: * @param selector A string that represents the selector for this hop. */ HopSpec(const string &name, const string &selector); + ~HopSpec(); /** * Returns the protocol-unique name of this hop. diff --git a/messagebus/src/vespa/messagebus/routing/policydirective.cpp b/messagebus/src/vespa/messagebus/routing/policydirective.cpp index c14421e7424..5a8543832a1 100644 --- a/messagebus/src/vespa/messagebus/routing/policydirective.cpp +++ b/messagebus/src/vespa/messagebus/routing/policydirective.cpp @@ -9,6 +9,8 @@ PolicyDirective::PolicyDirective(const vespalib::stringref &name, const vespalib _param(param) { } +PolicyDirective::~PolicyDirective() {} + string PolicyDirective::toString() const { diff --git a/messagebus/src/vespa/messagebus/routing/policydirective.h b/messagebus/src/vespa/messagebus/routing/policydirective.h index 30102ff276b..187f57e552d 100644 --- a/messagebus/src/vespa/messagebus/routing/policydirective.h +++ b/messagebus/src/vespa/messagebus/routing/policydirective.h @@ -26,6 +26,7 @@ public: * @param param The parameter to pass to the name constructor. */ PolicyDirective(const vespalib::stringref &name, const vespalib::stringref ¶m); + ~PolicyDirective(); /** * Returns the name of the policy that this item is to invoke. diff --git a/messagebus/src/vespa/messagebus/routing/routespec.cpp b/messagebus/src/vespa/messagebus/routing/routespec.cpp index 7d6cf65aa1f..8a54a7f2946 100644 --- a/messagebus/src/vespa/messagebus/routing/routespec.cpp +++ b/messagebus/src/vespa/messagebus/routing/routespec.cpp @@ -1,4 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. + #include "routingspec.h" #include <vespa/vespalib/util/stringfmt.h> @@ -9,6 +10,11 @@ RouteSpec::RouteSpec(const string &name) : _hops() { } +RouteSpec::RouteSpec(const RouteSpec &) = default; +RouteSpec & RouteSpec::operator = (const RouteSpec &) = default; + +RouteSpec::~RouteSpec() {} + RouteSpec & RouteSpec::addHops(const std::vector<string> &hops) { diff --git a/messagebus/src/vespa/messagebus/routing/routespec.h b/messagebus/src/vespa/messagebus/routing/routespec.h index 1eaefb11958..a5b47142c70 100644 --- a/messagebus/src/vespa/messagebus/routing/routespec.h +++ b/messagebus/src/vespa/messagebus/routing/routespec.h @@ -1,7 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once -#include <string> +#include <vespa/vespalib/stllike/string.h> #include <vector> namespace mbus { @@ -28,6 +28,12 @@ public: * @param name A protocol-unique name for this route. */ RouteSpec(const string &name); + RouteSpec(const RouteSpec &); + RouteSpec & operator = (const RouteSpec &); + RouteSpec(RouteSpec &&) = default; + RouteSpec & operator = (RouteSpec &&) = default; + + ~RouteSpec(); /** * Returns the protocol-unique name of this route. diff --git a/messagebus/src/vespa/messagebus/testlib/receptor.cpp b/messagebus/src/vespa/messagebus/testlib/receptor.cpp index d2d0668901c..00e22559d84 100644 --- a/messagebus/src/vespa/messagebus/testlib/receptor.cpp +++ b/messagebus/src/vespa/messagebus/testlib/receptor.cpp @@ -12,6 +12,8 @@ Receptor::Receptor() _reply() { } +Receptor::~Receptor() {} + void Receptor::handleMessage(Message::UP msg) { diff --git a/messagebus/src/vespa/messagebus/testlib/receptor.h b/messagebus/src/vespa/messagebus/testlib/receptor.h index 2e9a424b481..16c5cfcfc4c 100644 --- a/messagebus/src/vespa/messagebus/testlib/receptor.h +++ b/messagebus/src/vespa/messagebus/testlib/receptor.h @@ -2,9 +2,9 @@ #pragma once -#include <vespa/vespalib/util/sync.h> #include <vespa/messagebus/imessagehandler.h> #include <vespa/messagebus/ireplyhandler.h> +#include <vespa/vespalib/util/sync.h> namespace mbus { @@ -20,6 +20,7 @@ private: Receptor &operator=(const Receptor &); public: Receptor(); + ~Receptor(); void handleMessage(Message::UP msg) override; void handleReply(Reply::UP reply) override; Message::UP getMessage(double maxWait = 120.0); diff --git a/messagebus/src/vespa/messagebus/testlib/testserver.cpp b/messagebus/src/vespa/messagebus/testlib/testserver.cpp index 23aa4e04094..ae509241704 100644 --- a/messagebus/src/vespa/messagebus/testlib/testserver.cpp +++ b/messagebus/src/vespa/messagebus/testlib/testserver.cpp @@ -5,8 +5,6 @@ #include "slobrok.h" #include "slobrokstate.h" #include <vespa/vespalib/component/vtag.h> -#include <vespa/vespalib/util/vstringfmt.h> -#include <vespa/messagebus/network/rpcnetworkparams.h> namespace mbus { @@ -42,9 +40,9 @@ TestServer::TestServer(const MessageBusParams &mbusParams, const RPCNetworkParams &netParams) : net(netParams), mb(net, mbusParams) -{ - // empty -} +{} + +TestServer::~TestServer() {} bool TestServer::waitSlobrok(const string &pattern, uint32_t cnt) diff --git a/messagebus/src/vespa/messagebus/testlib/testserver.h b/messagebus/src/vespa/messagebus/testlib/testserver.h index 92d2ac51c89..9c1b07ea476 100644 --- a/messagebus/src/vespa/messagebus/testlib/testserver.h +++ b/messagebus/src/vespa/messagebus/testlib/testserver.h @@ -42,6 +42,7 @@ public: IProtocol::SP protocol = IProtocol::SP()); TestServer(const MessageBusParams &mbusParams, const RPCNetworkParams &netParams); + ~TestServer(); bool waitSlobrok(const string &pattern, uint32_t cnt = 1); bool waitOOS(const string &service); @@ -51,4 +52,3 @@ public: }; } // namespace mbus - |