Fix warnings

This commit is contained in:
Alexey Rybalchenko 2018-01-31 15:18:39 +01:00 committed by Mohammad Al-Turany
parent e5c4ad31c7
commit 4e2a195289
6 changed files with 6 additions and 21 deletions

View File

@ -795,7 +795,7 @@ shared_ptr<FairMQTransportFactory> FairMQDevice::AddTransport(const string& tran
FairMQMessagePtr msg(tr->CreateMessage()); FairMQMessagePtr msg(tr->CreateMessage());
return move(tr); return tr;
} }
else else
{ {
@ -834,7 +834,7 @@ unique_ptr<FairMQTransportFactory> FairMQDevice::MakeTransport(const string& tra
return tr; return tr;
} }
return move(tr); return tr;
} }
void FairMQDevice::CreateOwnConfig() void FairMQDevice::CreateOwnConfig()

View File

@ -84,19 +84,6 @@ class FairMQProgOptions : public FairProgOptions
// - if UpdateChannelMap(const FairMQMap& map) method is called // - if UpdateChannelMap(const FairMQMap& map) method is called
// - if UserParser template method is called (it is called in the ParseAll method if json or xml MQ-config files is provided) // - if UserParser template method is called (it is called in the ParseAll method if json or xml MQ-config files is provided)
// specialization/overloading for string, pass by const ref
int UpdateValue(const std::string& key, const std::string& val) // string API
{
UpdateValue(key, val);
return 0;
}
int UpdateValue(const std::string& key, const char* val) // string API
{
UpdateValue<std::string>(key, std::string(val));
return 0;
}
template<typename T> template<typename T>
int UpdateValue(const std::string& key, T val) int UpdateValue(const std::string& key, T val)
{ {

View File

@ -38,8 +38,8 @@ DDS::DDS(const string name, const Plugin::Version version, const string maintain
, fNewEvent() , fNewEvent()
, fDeviceTerminationRequested(false) , fDeviceTerminationRequested(false)
, fIosWork{fIos} , fIosWork{fIos}
, fHeartbeatInterval{100}
, fHeartbeatTimer{fIos, fHeartbeatInterval} , fHeartbeatTimer{fIos, fHeartbeatInterval}
, fHeartbeatInterval{100}
{ {
try try
{ {
@ -279,7 +279,7 @@ auto DDS::SubscribeForCustomCommands() -> void
else if (cmd == "subscribe-to-heartbeats") else if (cmd == "subscribe-to-heartbeats")
{ {
{ {
auto size = fHeartbeatSubscribers.size(); // auto size = fHeartbeatSubscribers.size();
std::lock_guard<std::mutex> lock{fHeartbeatSubscriberMutex}; std::lock_guard<std::mutex> lock{fHeartbeatSubscriberMutex};
fHeartbeatSubscribers.insert(senderId); fHeartbeatSubscribers.insert(senderId);
} }
@ -296,7 +296,7 @@ auto DDS::SubscribeForCustomCommands() -> void
else if (cmd == "subscribe-to-state-changes") else if (cmd == "subscribe-to-state-changes")
{ {
{ {
auto size = fStateChangeSubscribers.size(); // auto size = fStateChangeSubscribers.size();
std::lock_guard<std::mutex> lock{fStateChangeSubscriberMutex}; std::lock_guard<std::mutex> lock{fStateChangeSubscriberMutex};
fStateChangeSubscribers.insert(senderId); fStateChangeSubscribers.insert(senderId);
} }

View File

@ -37,7 +37,6 @@ FairMQTransportFactorySHM::FairMQTransportFactorySHM(const string& id, const Fai
: FairMQTransportFactory(id) : FairMQTransportFactory(id)
, fSessionName("default") , fSessionName("default")
, fContext(nullptr) , fContext(nullptr)
, fHeartbeatSocket(nullptr)
, fHeartbeatThread() , fHeartbeatThread()
, fSendHeartbeats(true) , fSendHeartbeats(true)
, fShMutex(nullptr) , fShMutex(nullptr)

View File

@ -58,7 +58,6 @@ class FairMQTransportFactorySHM : public FairMQTransportFactory
static FairMQ::Transport fTransportType; static FairMQ::Transport fTransportType;
std::string fSessionName; std::string fSessionName;
void* fContext; void* fContext;
void* fHeartbeatSocket;
std::thread fHeartbeatThread; std::thread fHeartbeatThread;
std::atomic<bool> fSendHeartbeats; std::atomic<bool> fSendHeartbeats;
std::unique_ptr<boost::interprocess::named_mutex> fShMutex; std::unique_ptr<boost::interprocess::named_mutex> fShMutex;

View File

@ -37,7 +37,7 @@ namespace shmem
class Manager class Manager
{ {
friend class Region; friend struct Region;
public: public:
Manager(const std::string& name, size_t size); Manager(const std::string& name, size_t size);