fix gcc warnings
This commit is contained in:
parent
347fc02dcf
commit
470d390658
@ -121,7 +121,7 @@ void Port::recalculateAverageRates()
|
|||||||
|
|
||||||
void Port::setAveragePacketRate(double packetsPerSec)
|
void Port::setAveragePacketRate(double packetsPerSec)
|
||||||
{
|
{
|
||||||
double rate;
|
double rate = 0;
|
||||||
double pps = 0;
|
double pps = 0;
|
||||||
double bps = 0;
|
double bps = 0;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
@ -811,6 +811,7 @@ void StreamConfigDialog::__updateProtocol(int level, int newId)
|
|||||||
|
|
||||||
ret = skipProtocols(level-1);
|
ret = skipProtocols(level-1);
|
||||||
Q_ASSERT(ret == true);
|
Q_ASSERT(ret == true);
|
||||||
|
Q_UNUSED(ret);
|
||||||
|
|
||||||
Q_ASSERT(oldId != newId);
|
Q_ASSERT(oldId != newId);
|
||||||
Q_ASSERT(newId != ButtonIdOther);
|
Q_ASSERT(newId != ButtonIdOther);
|
||||||
|
@ -363,7 +363,7 @@ bool StreamBase::setBurstRate(double burstsPerSec)
|
|||||||
/*! Convenience Function */
|
/*! Convenience Function */
|
||||||
double StreamBase::averagePacketRate() const
|
double StreamBase::averagePacketRate() const
|
||||||
{
|
{
|
||||||
double avgPacketRate;
|
double avgPacketRate = 0;
|
||||||
|
|
||||||
switch (sendUnit())
|
switch (sendUnit())
|
||||||
{
|
{
|
||||||
|
@ -96,7 +96,7 @@ void PbRpcChannel::CallMethod(
|
|||||||
::google::protobuf::Message *response,
|
::google::protobuf::Message *response,
|
||||||
::google::protobuf::Closure* done)
|
::google::protobuf::Closure* done)
|
||||||
{
|
{
|
||||||
char* const msg = (char*) &msgBuf[0];
|
char* msg = (char*) &msgBuf[0];
|
||||||
int len;
|
int len;
|
||||||
bool ret;
|
bool ret;
|
||||||
|
|
||||||
@ -157,6 +157,7 @@ void PbRpcChannel::CallMethod(
|
|||||||
mpSocket->write(msg, PB_HDR_SIZE);
|
mpSocket->write(msg, PB_HDR_SIZE);
|
||||||
ret = req->SerializeToZeroCopyStream(outStream);
|
ret = req->SerializeToZeroCopyStream(outStream);
|
||||||
Q_ASSERT(ret == true);
|
Q_ASSERT(ret == true);
|
||||||
|
Q_UNUSED(ret);
|
||||||
outStream->Flush();
|
outStream->Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,6 +183,7 @@ void PbRpcChannel::on_mpSocket_readyRead()
|
|||||||
msgLen = mpSocket->read((char*)msg, PB_HDR_SIZE);
|
msgLen = mpSocket->read((char*)msg, PB_HDR_SIZE);
|
||||||
|
|
||||||
Q_ASSERT(msgLen == PB_HDR_SIZE);
|
Q_ASSERT(msgLen == PB_HDR_SIZE);
|
||||||
|
Q_UNUSED(msgLen);
|
||||||
|
|
||||||
type = qFromBigEndian<quint16>(msg+0);
|
type = qFromBigEndian<quint16>(msg+0);
|
||||||
method = qFromBigEndian<quint16>(msg+2);
|
method = qFromBigEndian<quint16>(msg+2);
|
||||||
|
@ -56,7 +56,7 @@ public:
|
|||||||
|
|
||||||
// Server Side Methods
|
// Server Side Methods
|
||||||
void SetFailed(const QString &reason)
|
void SetFailed(const QString &reason)
|
||||||
{ failed = true; errStr = reason; qWarning(qPrintable(errStr)); }
|
{ failed = true; errStr = reason; qWarning("%s", qPrintable(errStr)); }
|
||||||
void SetFailed(const std::string &reason)
|
void SetFailed(const std::string &reason)
|
||||||
{ SetFailed(QString::fromStdString(reason)); }
|
{ SetFailed(QString::fromStdString(reason)); }
|
||||||
QString ErrorString() const { return errStr; }
|
QString ErrorString() const { return errStr; }
|
||||||
|
@ -149,6 +149,7 @@ void RpcConnection::sendRpcReply(PbRpcController *controller)
|
|||||||
len = blob->read(msg, sizeof(msgBuf));
|
len = blob->read(msg, sizeof(msgBuf));
|
||||||
l = clientSock->write(msg, len);
|
l = clientSock->write(msg, len);
|
||||||
Q_ASSERT(l == len);
|
Q_ASSERT(l == len);
|
||||||
|
Q_UNUSED(l);
|
||||||
}
|
}
|
||||||
|
|
||||||
goto _exit;
|
goto _exit;
|
||||||
@ -355,7 +356,7 @@ _error_exit2:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RpcConnection::connIdMsgHandler(QtMsgType type, const char* msg)
|
void RpcConnection::connIdMsgHandler(QtMsgType /*type*/, const char* msg)
|
||||||
{
|
{
|
||||||
if (connId.hasLocalData()) {
|
if (connId.hasLocalData()) {
|
||||||
QString newMsg(*connId.localData());
|
QString newMsg(*connId.localData());
|
||||||
|
Loading…
Reference in New Issue
Block a user