diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-02-26 15:07:24 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-02-26 15:38:27 +0000 |
commit | bf0a3b6c6b0dc35420655e6325dc3529da7d40b1 (patch) | |
tree | e405e3a5cbb8f9fbd0f0f462ece531e05a3a4cd7 | |
parent | 7bd6d072ed18b2f5732f9b15eaf4bc1c9b45f5df (diff) | |
download | qtwebsockets-bf0a3b6c6b0dc35420655e6325dc3529da7d40b1.tar.gz |
Fix two gcc warningsv5.5.0-alpha1
Change-Id: I549eb67109eba2cfb766eec78377d63ecc34d3c8
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
-rw-r--r-- | src/websockets/qwebsockethandshakerequest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/websockets/qwebsockethandshakerequest.cpp b/src/websockets/qwebsockethandshakerequest.cpp index 436ac93..528cb32 100644 --- a/src/websockets/qwebsockethandshakerequest.cpp +++ b/src/websockets/qwebsockethandshakerequest.cpp @@ -227,9 +227,9 @@ void QWebSocketHandshakeRequest::readHandshake(QTextStream &textStream) if (m_requestUrl.isRelative()) { // see http://tools.ietf.org/html/rfc6455#page-17 // No. 4 item in "The requirements for this handshake" - int idx = host.indexOf(":"); + int idx = host.indexOf(QStringLiteral(":")); bool ok = false; - int port; + int port = 0; if (idx != -1) { port = host.rightRef(host.length() - idx - 1).toInt(&ok); host.truncate(idx); |