mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Fix various warnings
-Wunused-parameter -Wreorder -Wsign-compare -Wunused-private-field
This commit is contained in:
committed by
Mohammad Al-Turany
parent
811e716731
commit
72f5cdef58
@@ -28,6 +28,7 @@ FairMQChannel::FairMQChannel()
|
||||
, fType("unspecified")
|
||||
, fMethod("unspecified")
|
||||
, fAddress("unspecified")
|
||||
, fTransportType(fair::mq::Transport::DEFAULT)
|
||||
, fSndBufSize(1000)
|
||||
, fRcvBufSize(1000)
|
||||
, fSndKernelSize(0)
|
||||
@@ -35,7 +36,6 @@ FairMQChannel::FairMQChannel()
|
||||
, fRateLogging(1)
|
||||
, fName("")
|
||||
, fIsValid(false)
|
||||
, fTransportType(fair::mq::Transport::DEFAULT)
|
||||
, fTransportFactory(nullptr)
|
||||
, fMultipart(false)
|
||||
, fModified(true)
|
||||
@@ -48,6 +48,7 @@ FairMQChannel::FairMQChannel(const string& type, const string& method, const str
|
||||
, fType(type)
|
||||
, fMethod(method)
|
||||
, fAddress(address)
|
||||
, fTransportType(fair::mq::Transport::DEFAULT)
|
||||
, fSndBufSize(1000)
|
||||
, fRcvBufSize(1000)
|
||||
, fSndKernelSize(0)
|
||||
@@ -55,7 +56,6 @@ FairMQChannel::FairMQChannel(const string& type, const string& method, const str
|
||||
, fRateLogging(1)
|
||||
, fName("")
|
||||
, fIsValid(false)
|
||||
, fTransportType(fair::mq::Transport::DEFAULT)
|
||||
, fTransportFactory(nullptr)
|
||||
, fMultipart(false)
|
||||
, fModified(true)
|
||||
@@ -68,6 +68,7 @@ FairMQChannel::FairMQChannel(const string& name, const string& type, std::shared
|
||||
, fType(type)
|
||||
, fMethod("unspecified")
|
||||
, fAddress("unspecified")
|
||||
, fTransportType(factory->GetType())
|
||||
, fSndBufSize(1000)
|
||||
, fRcvBufSize(1000)
|
||||
, fSndKernelSize(0)
|
||||
@@ -75,7 +76,6 @@ FairMQChannel::FairMQChannel(const string& name, const string& type, std::shared
|
||||
, fRateLogging(1)
|
||||
, fName(name)
|
||||
, fIsValid(false)
|
||||
, fTransportType(factory->GetType())
|
||||
, fTransportFactory(factory)
|
||||
, fMultipart(false)
|
||||
, fModified(true)
|
||||
@@ -88,6 +88,7 @@ FairMQChannel::FairMQChannel(const FairMQChannel& chan)
|
||||
, fType(chan.fType)
|
||||
, fMethod(chan.fMethod)
|
||||
, fAddress(chan.fAddress)
|
||||
, fTransportType(chan.fTransportType)
|
||||
, fSndBufSize(chan.fSndBufSize)
|
||||
, fRcvBufSize(chan.fRcvBufSize)
|
||||
, fSndKernelSize(chan.fSndKernelSize)
|
||||
@@ -95,7 +96,6 @@ FairMQChannel::FairMQChannel(const FairMQChannel& chan)
|
||||
, fRateLogging(chan.fRateLogging)
|
||||
, fName(chan.fName)
|
||||
, fIsValid(false)
|
||||
, fTransportType(chan.fTransportType)
|
||||
, fTransportFactory(nullptr)
|
||||
, fMultipart(chan.fMultipart)
|
||||
, fModified(chan.fModified)
|
||||
|
@@ -501,7 +501,7 @@ void FairMQDevice::RunWrapper()
|
||||
while (CheckCurrentState(RUNNING) && ConditionalRun())
|
||||
{
|
||||
if (fRate > 0.001) {
|
||||
auto timespan = chrono::duration_cast<TimeScale>(Clock::now() - reftime).count() - fLastTime;
|
||||
auto timespan = static_cast<TimeScale::rep>(chrono::duration_cast<TimeScale>(Clock::now() - reftime).count() - fLastTime);
|
||||
if (timespan < period) {
|
||||
TimeScale sleepfor(period - timespan);
|
||||
this_thread::sleep_for(sleepfor);
|
||||
|
@@ -72,8 +72,7 @@ struct Machine_ : public msmf::state_machine_def<Machine_>
|
||||
{
|
||||
public:
|
||||
Machine_()
|
||||
: fState()
|
||||
, fWork()
|
||||
: fWork()
|
||||
, fWorkAvailableCondition()
|
||||
, fWorkDoneCondition()
|
||||
, fWorkMutex()
|
||||
@@ -83,6 +82,7 @@ struct Machine_ : public msmf::state_machine_def<Machine_>
|
||||
, fStateChangeSignal()
|
||||
, fStateChangeSignalsMap()
|
||||
, fTerminationRequested(false)
|
||||
, fState()
|
||||
, fWorkerThread()
|
||||
{}
|
||||
|
||||
@@ -521,8 +521,8 @@ _Pragma("GCC diagnostic pop")
|
||||
using namespace fair::mq::fsm;
|
||||
|
||||
FairMQStateMachine::FairMQStateMachine()
|
||||
: fFsm(new FairMQFSM)
|
||||
, fChangeStateMutex()
|
||||
: fChangeStateMutex()
|
||||
, fFsm(new FairMQFSM)
|
||||
{
|
||||
static_pointer_cast<FairMQFSM>(fFsm)->fInitWrapperHandler = bind(&FairMQStateMachine::InitWrapper, this);
|
||||
static_pointer_cast<FairMQFSM>(fFsm)->fInitTaskWrapperHandler = bind(&FairMQStateMachine::InitTaskWrapper, this);
|
||||
@@ -775,4 +775,4 @@ int FairMQStateMachine::GetEventNumber(const string& event)
|
||||
LOG(error) << "Requested number for non-existent event... " << event << endl
|
||||
<< "Supported are: INIT_DEVICE, INIT_TASK, RUN, PAUSE, STOP, RESET_DEVICE, RESET_TASK, END, ERROR_FOUND";
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@@ -52,8 +52,8 @@ struct IofN
|
||||
, fEntries()
|
||||
{}
|
||||
|
||||
int fI;
|
||||
int fN;
|
||||
unsigned int fI;
|
||||
unsigned int fN;
|
||||
std::vector<std::string> fEntries;
|
||||
|
||||
};
|
||||
|
@@ -238,7 +238,7 @@ int FairMQSocketSHM::ReceiveImpl(FairMQMessagePtr& msg, const int flags, const i
|
||||
}
|
||||
}
|
||||
|
||||
int64_t FairMQSocketSHM::SendImpl(vector<FairMQMessagePtr>& msgVec, const int flags, const int timeout)
|
||||
int64_t FairMQSocketSHM::SendImpl(vector<FairMQMessagePtr>& msgVec, const int flags, const int /*timeout*/)
|
||||
{
|
||||
const unsigned int vecSize = msgVec.size();
|
||||
int64_t totalSize = 0;
|
||||
@@ -318,7 +318,7 @@ int64_t FairMQSocketSHM::SendImpl(vector<FairMQMessagePtr>& msgVec, const int fl
|
||||
}
|
||||
|
||||
|
||||
int64_t FairMQSocketSHM::ReceiveImpl(vector<FairMQMessagePtr>& msgVec, const int flags, const int timeout)
|
||||
int64_t FairMQSocketSHM::ReceiveImpl(vector<FairMQMessagePtr>& msgVec, const int flags, const int /*timeout*/)
|
||||
{
|
||||
int64_t totalSize = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user