From bf0a3b6c6b0dc35420655e6325dc3529da7d40b1 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Thu, 26 Feb 2015 15:07:24 +0100 Subject: Fix two gcc warnings Change-Id: I549eb67109eba2cfb766eec78377d63ecc34d3c8 Reviewed-by: Nikita Baryshnikov Reviewed-by: Liang Qi --- src/websockets/qwebsockethandshakerequest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit v1.2.1