From d254efb91ffc80784756a3188532a95ae9275180 Mon Sep 17 00:00:00 2001 From: Florian Uhlig Date: Tue, 15 Dec 2015 21:56:41 +0100 Subject: [PATCH] Fix compiler warnings. Mostly unused parameters have been removed. --- fairmq/devices/FairMQMerger.cxx | 2 +- fairmq/options/FairProgOptionsHelper.h | 4 ++-- fairmq/run/runMerger.cxx | 2 +- fairmq/zeromq/FairMQMessageZMQ.cxx | 4 ++-- fairmq/zeromq/FairMQPollerZMQ.cxx | 2 +- fairmq/zeromq/FairMQSocketZMQ.cxx | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/fairmq/devices/FairMQMerger.cxx b/fairmq/devices/FairMQMerger.cxx index 8c79c03d..5702d1a9 100644 --- a/fairmq/devices/FairMQMerger.cxx +++ b/fairmq/devices/FairMQMerger.cxx @@ -34,7 +34,7 @@ void FairMQMerger::Run() // store the channel references to avoid traversing the map on every loop iteration const FairMQChannel& dataOutChannel = fChannels.at("data-out").at(0); std::vector dataInChannels(fChannels.at("data-in").size()); - for (int i = 0; i < fChannels.at("data-in").size(); ++i) + for (unsigned int i = 0; i < fChannels.at("data-in").size(); ++i) { dataInChannels.at(i) = &(fChannels.at("data-in").at(i)); } diff --git a/fairmq/options/FairProgOptionsHelper.h b/fairmq/options/FairProgOptionsHelper.h index e737130e..51df98bb 100644 --- a/fairmq/options/FairProgOptionsHelper.h +++ b/fairmq/options/FairProgOptionsHelper.h @@ -98,12 +98,12 @@ namespace fairmq { typedef std::string returned_type; template - std::string Value(const po::variable_value& varValue,const std::string& type, const std::string& defaulted, const std::string& empty) + std::string Value(const po::variable_value& varValue,const std::string&, const std::string&, const std::string&) { return ConvertVariableValueToString(varValue); } - returned_type DefaultValue(const std::string& defaulted, const std::string& empty) + returned_type DefaultValue(const std::string&, const std::string&) { return std::string("empty value"); } diff --git a/fairmq/run/runMerger.cxx b/fairmq/run/runMerger.cxx index ae053bb8..17311c57 100644 --- a/fairmq/run/runMerger.cxx +++ b/fairmq/run/runMerger.cxx @@ -142,7 +142,7 @@ int main(int argc, char** argv) merger.SetTransport(transportFactory); - for (int i = 0; i < options.inputAddress.size(); ++i) + for (unsigned int i = 0; i < options.inputAddress.size(); ++i) { FairMQChannel inputChannel(options.inputSocketType.at(i), options.inputMethod.at(i), options.inputAddress.at(i)); inputChannel.UpdateSndBufSize(options.inputBufSize.at(i)); diff --git a/fairmq/zeromq/FairMQMessageZMQ.cxx b/fairmq/zeromq/FairMQMessageZMQ.cxx index acdcee31..28d7cd0d 100644 --- a/fairmq/zeromq/FairMQMessageZMQ.cxx +++ b/fairmq/zeromq/FairMQMessageZMQ.cxx @@ -89,7 +89,7 @@ size_t FairMQMessageZMQ::GetSize() return zmq_msg_size(&fMessage); } -void FairMQMessageZMQ::SetMessage(void* data, size_t size) +void FairMQMessageZMQ::SetMessage(void*, size_t) { // dummy method to comply with the interface. functionality not allowed in zeromq. } @@ -136,7 +136,7 @@ inline void FairMQMessageZMQ::CloseMessage() } } -void FairMQMessageZMQ::CleanUp(void* data, void* hint) +void FairMQMessageZMQ::CleanUp(void* data, void*) { free(data); } diff --git a/fairmq/zeromq/FairMQPollerZMQ.cxx b/fairmq/zeromq/FairMQPollerZMQ.cxx index 1374d592..fde97a3f 100644 --- a/fairmq/zeromq/FairMQPollerZMQ.cxx +++ b/fairmq/zeromq/FairMQPollerZMQ.cxx @@ -79,7 +79,7 @@ FairMQPollerZMQ::FairMQPollerZMQ(unordered_map>& c int index = 0; for (string channel : channelList) { - for (int i = 0; i < channelsMap.at(channel).size(); ++i) + for (unsigned int i = 0; i < channelsMap.at(channel).size(); ++i) { index = fOffsetMap[channel] + i; diff --git a/fairmq/zeromq/FairMQSocketZMQ.cxx b/fairmq/zeromq/FairMQSocketZMQ.cxx index ef4c4616..8b499b51 100644 --- a/fairmq/zeromq/FairMQSocketZMQ.cxx +++ b/fairmq/zeromq/FairMQSocketZMQ.cxx @@ -223,7 +223,7 @@ void* FairMQSocketZMQ::GetSocket() const return fSocket; } -int FairMQSocketZMQ::GetSocket(int nothing) const +int FairMQSocketZMQ::GetSocket(int) const { // dummy method to comply with the interface. functionality not possible in zeromq. return -1;