Fix (incorrect) implicit-fallthrough warnings in gcc7
All cases are annotated that it's an explicit fallthrough, so add Q_FALLTHROUGH to silence the warning.
This commit is contained in:
parent
d39fea1b67
commit
4b89011099
3 changed files with 7 additions and 0 deletions
|
@ -281,6 +281,7 @@ QPixmap PlastikButtonProvider::icon(ButtonIcon icon, int size, bool active, bool
|
||||||
drawObject(p, HorizontalLine, r.x()+(r.width()-lwMark)/2, r.y()+(r.height()-lwMark)/2, lwMark, lwMark);
|
drawObject(p, HorizontalLine, r.x()+(r.width()-lwMark)/2, r.y()+(r.height()-lwMark)/2, lwMark, lwMark);
|
||||||
|
|
||||||
// Fall through to OnAllDesktopsIcon intended!
|
// Fall through to OnAllDesktopsIcon intended!
|
||||||
|
Q_FALLTHROUGH();
|
||||||
}
|
}
|
||||||
case OnAllDesktopsIcon:
|
case OnAllDesktopsIcon:
|
||||||
{
|
{
|
||||||
|
@ -306,6 +307,7 @@ QPixmap PlastikButtonProvider::icon(ButtonIcon icon, int size, bool active, bool
|
||||||
drawObject(p, HorizontalLine, center-(lwArrow-2), r.y()+2*lwArrow, (lwArrow-2)*2, lwArrow);
|
drawObject(p, HorizontalLine, center-(lwArrow-2), r.y()+2*lwArrow, (lwArrow-2)*2, lwArrow);
|
||||||
|
|
||||||
// Fall through to KeepAboveIcon intended!
|
// Fall through to KeepAboveIcon intended!
|
||||||
|
Q_FALLTHROUGH();
|
||||||
}
|
}
|
||||||
case KeepAboveIcon:
|
case KeepAboveIcon:
|
||||||
{
|
{
|
||||||
|
@ -331,6 +333,7 @@ QPixmap PlastikButtonProvider::icon(ButtonIcon icon, int size, bool active, bool
|
||||||
drawObject(p, HorizontalLine, center-(lwArrow-2), r.bottom()-(lwArrow-1)-2*lwArrow, (lwArrow-2)*2, lwArrow);
|
drawObject(p, HorizontalLine, center-(lwArrow-2), r.bottom()-(lwArrow-1)-2*lwArrow, (lwArrow-2)*2, lwArrow);
|
||||||
|
|
||||||
// Fall through to KeepBelowIcon intended!
|
// Fall through to KeepBelowIcon intended!
|
||||||
|
Q_FALLTHROUGH();
|
||||||
}
|
}
|
||||||
case KeepBelowIcon:
|
case KeepBelowIcon:
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,6 +97,7 @@ OpenGLBackend *X11StandalonePlatform::createOpenGLBackend()
|
||||||
} else {
|
} else {
|
||||||
qCWarning(KWIN_X11STANDALONE) << "Glx not available, trying EGL instead.";
|
qCWarning(KWIN_X11STANDALONE) << "Glx not available, trying EGL instead.";
|
||||||
// no break, needs fall-through
|
// no break, needs fall-through
|
||||||
|
Q_FALLTHROUGH();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
case EglPlatformInterface:
|
case EglPlatformInterface:
|
||||||
|
@ -211,6 +212,7 @@ void X11StandalonePlatform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
|
||||||
group.writeEntry(unsafeKey, true);
|
group.writeEntry(unsafeKey, true);
|
||||||
group.sync();
|
group.sync();
|
||||||
// Deliberately continue with PreFrame
|
// Deliberately continue with PreFrame
|
||||||
|
Q_FALLTHROUGH();
|
||||||
case OpenGLSafePoint::PreFrame:
|
case OpenGLSafePoint::PreFrame:
|
||||||
if (m_openGLFreezeProtectionThread == nullptr) {
|
if (m_openGLFreezeProtectionThread == nullptr) {
|
||||||
Q_ASSERT(m_openGLFreezeProtection == nullptr);
|
Q_ASSERT(m_openGLFreezeProtection == nullptr);
|
||||||
|
@ -239,6 +241,7 @@ void X11StandalonePlatform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
|
||||||
group.writeEntry(unsafeKey, false);
|
group.writeEntry(unsafeKey, false);
|
||||||
group.sync();
|
group.sync();
|
||||||
// Deliberately continue with PostFrame
|
// Deliberately continue with PostFrame
|
||||||
|
Q_FALLTHROUGH();
|
||||||
case OpenGLSafePoint::PostFrame:
|
case OpenGLSafePoint::PostFrame:
|
||||||
QMetaObject::invokeMethod(m_openGLFreezeProtection, "stop", Qt::QueuedConnection);
|
QMetaObject::invokeMethod(m_openGLFreezeProtection, "stop", Qt::QueuedConnection);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -525,6 +525,7 @@ void SceneOpenGL::initDebugOutput()
|
||||||
if (strstr(message, "Buffer detailed info:") && strstr(message, "has been updated"))
|
if (strstr(message, "Buffer detailed info:") && strstr(message, "has been updated"))
|
||||||
scheduleVboReInit();
|
scheduleVboReInit();
|
||||||
// fall through! for general message printing
|
// fall through! for general message printing
|
||||||
|
Q_FALLTHROUGH();
|
||||||
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
|
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
|
||||||
case GL_DEBUG_TYPE_PORTABILITY:
|
case GL_DEBUG_TYPE_PORTABILITY:
|
||||||
case GL_DEBUG_TYPE_PERFORMANCE:
|
case GL_DEBUG_TYPE_PERFORMANCE:
|
||||||
|
|
Loading…
Reference in a new issue