summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-02-26 15:07:24 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-02-26 15:38:27 +0000
commitbf0a3b6c6b0dc35420655e6325dc3529da7d40b1 (patch)
treee405e3a5cbb8f9fbd0f0f462ece531e05a3a4cd7 /src
parent7bd6d072ed18b2f5732f9b15eaf4bc1c9b45f5df (diff)
downloadqtwebsockets-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>
Diffstat (limited to 'src')
-rw-r--r--src/websockets/qwebsockethandshakerequest.cpp4
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);