summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorTim Blechmann <tim@klingt.org>2024-02-29 09:30:24 +0800
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2024-03-01 03:04:06 +0000
commitc26994ff1551aa5450383cc51bed9b4d39f973f7 (patch)
tree8f7ee7af13b5e2b26a50be7b762fc690a314270f /src/network
parentddaf7642828c970a69c995a606c5cb16e003c26c (diff)
Fix -Wimplicit-fallthrough for clang
Clang's `-Wimplicit-fallthrough` warnings are a little stricter than gcc's interpretation: switch (i) { case 0: foo(); case 4: break; } While gcc accepts the implicit fallthrough, if the following statement is a trivial `break`, clang will warn about it. Pick-to: 6.7 Change-Id: I38e0817f1bc034fbb552aeac21de1516edcbcbb0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/access/http2/http2frames.cpp1
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/network/access/http2/http2frames.cpp b/src/network/access/http2/http2frames.cpp
index 194ddbfd62..e07c96b803 100644
--- a/src/network/access/http2/http2frames.cpp
+++ b/src/network/access/http2/http2frames.cpp
@@ -135,6 +135,7 @@ FrameStatus Frame::validateHeader() const
// 6.6 PUSH_PROMISE
if (framePayloadSize < 4)
return FrameStatus::sizeError;
+ break;
default:
// DATA/HEADERS/CONTINUATION will be verified
// when we have payload.
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index 35c1b84ce7..b6df412253 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -436,6 +436,7 @@ bool QNativeSocketEnginePrivate::nativeConnect(const QHostAddress &addr, quint16
case EFAULT:
case ENOTSOCK:
socketState = QAbstractSocket::UnconnectedState;
+ break;
default:
break;
}