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);
|
||||
|
||||
// Fall through to OnAllDesktopsIcon intended!
|
||||
Q_FALLTHROUGH();
|
||||
}
|
||||
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);
|
||||
|
||||
// Fall through to KeepAboveIcon intended!
|
||||
Q_FALLTHROUGH();
|
||||
}
|
||||
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);
|
||||
|
||||
// Fall through to KeepBelowIcon intended!
|
||||
Q_FALLTHROUGH();
|
||||
}
|
||||
case KeepBelowIcon:
|
||||
{
|
||||
|
|
|
@ -97,6 +97,7 @@ OpenGLBackend *X11StandalonePlatform::createOpenGLBackend()
|
|||
} else {
|
||||
qCWarning(KWIN_X11STANDALONE) << "Glx not available, trying EGL instead.";
|
||||
// no break, needs fall-through
|
||||
Q_FALLTHROUGH();
|
||||
}
|
||||
#endif
|
||||
case EglPlatformInterface:
|
||||
|
@ -211,6 +212,7 @@ void X11StandalonePlatform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
|
|||
group.writeEntry(unsafeKey, true);
|
||||
group.sync();
|
||||
// Deliberately continue with PreFrame
|
||||
Q_FALLTHROUGH();
|
||||
case OpenGLSafePoint::PreFrame:
|
||||
if (m_openGLFreezeProtectionThread == nullptr) {
|
||||
Q_ASSERT(m_openGLFreezeProtection == nullptr);
|
||||
|
@ -239,6 +241,7 @@ void X11StandalonePlatform::createOpenGLSafePoint(OpenGLSafePoint safePoint)
|
|||
group.writeEntry(unsafeKey, false);
|
||||
group.sync();
|
||||
// Deliberately continue with PostFrame
|
||||
Q_FALLTHROUGH();
|
||||
case OpenGLSafePoint::PostFrame:
|
||||
QMetaObject::invokeMethod(m_openGLFreezeProtection, "stop", Qt::QueuedConnection);
|
||||
break;
|
||||
|
|
|
@ -525,6 +525,7 @@ void SceneOpenGL::initDebugOutput()
|
|||
if (strstr(message, "Buffer detailed info:") && strstr(message, "has been updated"))
|
||||
scheduleVboReInit();
|
||||
// fall through! for general message printing
|
||||
Q_FALLTHROUGH();
|
||||
case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR:
|
||||
case GL_DEBUG_TYPE_PORTABILITY:
|
||||
case GL_DEBUG_TYPE_PERFORMANCE:
|
||||
|
|
Loading…
Reference in a new issue