summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2016-10-06 18:58:23 +0200
committerMarc Mutz <marc.mutz@kdab.com>2017-01-14 06:28:09 +0000
commit67f11a31997dc2cf804b627a8d55cc7d78fec37a (patch)
treecb7bc6443e02c98435e882708f1c03fc26824088 /src/network
parent5a1b4832a2704e7fb386d6b4c73dab85facdc40b (diff)
QtNetwork: fix GCC 7 warnings
GCC 7 warns about implicit fall-throughs now. Fix by adding the missing Q_FALLTHROUGH(), and, in one case, by moving the existing suppressant into the correct position. Change-Id: I7383f47e690b6334ef69c9df745c2205247ca7d0 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/qhttpnetworkconnectionchannel.cpp2
-rw-r--r--src/network/kernel/qhostaddress.cpp8
2 files changed, 8 insertions, 2 deletions
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 205490b830..7fa19dc65b 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -1080,8 +1080,8 @@ void QHttpNetworkConnectionChannel::_q_encrypted()
"detected unknown Next Protocol Negotiation protocol");
break;
}
- Q_FALLTHROUGH();
}
+ Q_FALLTHROUGH();
case QSslConfiguration::NextProtocolNegotiationNone:
protocolHandler.reset(new QHttpProtocolHandler(this));
connection->setConnectionType(QHttpNetworkConnection::ConnectionTypeHTTP);
diff --git a/src/network/kernel/qhostaddress.cpp b/src/network/kernel/qhostaddress.cpp
index 8fac76f86a..086e8cede1 100644
--- a/src/network/kernel/qhostaddress.cpp
+++ b/src/network/kernel/qhostaddress.cpp
@@ -291,21 +291,27 @@ bool QNetmaskAddress::setAddress(const QHostAddress &address)
d->clear();
return false; // invalid IP-style netmask
- // the rest always falls through
case 254:
++netmask;
+ Q_FALLTHROUGH();
case 252:
++netmask;
+ Q_FALLTHROUGH();
case 248:
++netmask;
+ Q_FALLTHROUGH();
case 240:
++netmask;
+ Q_FALLTHROUGH();
case 224:
++netmask;
+ Q_FALLTHROUGH();
case 192:
++netmask;
+ Q_FALLTHROUGH();
case 128:
++netmask;
+ Q_FALLTHROUGH();
case 0:
break;
}