diff options
author | Tim Blechmann <tim@klingt.org> | 2024-02-29 09:30:24 +0800 |
---|---|---|
committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2024-03-01 03:04:06 +0000 |
commit | c26994ff1551aa5450383cc51bed9b4d39f973f7 (patch) | |
tree | 8f7ee7af13b5e2b26a50be7b762fc690a314270f /src/plugins/platforms | |
parent | ddaf7642828c970a69c995a606c5cb16e003c26c (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/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbwindow.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index adfb107150..faeb9cd314 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -135,6 +135,7 @@ void QXcbWindow::setImageFormatForVisual(const xcb_visualtype_t *visual) case 16: qWarning("Using RGB16 fallback, if this works your X11 server is reporting a bad screen format."); m_imageFormat = QImage::Format_RGB16; + break; default: break; } |