From 67f11a31997dc2cf804b627a8d55cc7d78fec37a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 6 Oct 2016 18:58:23 +0200 Subject: 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 --- src/network/kernel/qhostaddress.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/network/kernel/qhostaddress.cpp') 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; } -- cgit v1.2.3