Commit 4500ff1a authored by Kurt Pattyn's avatar Kurt Pattyn Committed by The Qt Project
Browse files

Remove checks on return value of sendXXX methods


Change-Id: If70aa381e377b832f0b44af97e19abf98f3941eb
Reviewed-by: default avatarKurt Pattyn <pattyn.kurt@gmail.com>
Showing with 5 additions and 10 deletions
...@@ -85,8 +85,7 @@ void EchoServer::processTextMessage(QString message) ...@@ -85,8 +85,7 @@ void EchoServer::processTextMessage(QString message)
{ {
QWebSocket *pClient = qobject_cast<QWebSocket *>(sender()); QWebSocket *pClient = qobject_cast<QWebSocket *>(sender());
if (pClient) { if (pClient) {
qint64 bytesWritten = pClient->sendTextMessage(message); pClient->sendTextMessage(message);
Q_UNUSED(bytesWritten);
} }
m_pWebSocketServer->close(); m_pWebSocketServer->close();
} }
...@@ -97,8 +96,7 @@ void EchoServer::processBinaryMessage(QByteArray message) ...@@ -97,8 +96,7 @@ void EchoServer::processBinaryMessage(QByteArray message)
{ {
QWebSocket *pClient = qobject_cast<QWebSocket *>(sender()); QWebSocket *pClient = qobject_cast<QWebSocket *>(sender());
if (pClient) { if (pClient) {
qint64 bytesWritten = pClient->sendBinaryMessage(message); pClient->sendBinaryMessage(message);
Q_UNUSED(bytesWritten);
} }
} }
//! [processBinaryMessage] //! [processBinaryMessage]
......
...@@ -89,8 +89,7 @@ void ChatServer::processMessage(QString message) ...@@ -89,8 +89,7 @@ void ChatServer::processMessage(QString message)
{ {
if (pClient != pSender) //don't echo message back to sender if (pClient != pSender) //don't echo message back to sender
{ {
qint64 bytesWritten = pClient->sendTextMessage(message); pClient->sendTextMessage(message);
Q_UNUSED(bytesWritten);
} }
} }
} }
......
...@@ -111,8 +111,7 @@ void SslEchoServer::processTextMessage(QString message) ...@@ -111,8 +111,7 @@ void SslEchoServer::processTextMessage(QString message)
QWebSocket *pClient = qobject_cast<QWebSocket *>(sender()); QWebSocket *pClient = qobject_cast<QWebSocket *>(sender());
if (pClient) if (pClient)
{ {
qint64 bytesWritten = pClient->sendTextMessage(message); pClient->sendTextMessage(message);
Q_UNUSED(bytesWritten);
} }
} }
//! [processTextMessage] //! [processTextMessage]
...@@ -123,8 +122,7 @@ void SslEchoServer::processBinaryMessage(QByteArray message) ...@@ -123,8 +122,7 @@ void SslEchoServer::processBinaryMessage(QByteArray message)
QWebSocket *pClient = qobject_cast<QWebSocket *>(sender()); QWebSocket *pClient = qobject_cast<QWebSocket *>(sender());
if (pClient) if (pClient)
{ {
qint64 bytesWritten = pClient->sendBinaryMessage(message); pClient->sendBinaryMessage(message);
Q_UNUSED(bytesWritten);
} }
} }
//! [processBinaryMessage] //! [processBinaryMessage]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment