Fix 'implicit-fallthrough' build error on GCC 9.3.0
authorSÅ‚awomir Cygan <slawomir.cygan@intel.com>
Wed, 14 Apr 2021 16:12:12 +0000 (18:12 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Fri, 19 Nov 2021 17:26:46 +0000 (17:26 +0000)
It seems the existing comment was not hitting the regular
expression used by the GCC compiler when reading user comments
before case switch fallthrough.

The warning is triggered by -Wextra, which on GCC enables
'-Wimplicit-fallthrough=3'.

Another way to avoid the warning would be to use
[[fallthrough]] statement, but it's from C++17, which does not seem
to be enabled.

Components: Vulkan

Change-Id: Ica52e88f94f4f1c303511d8462938856cb676146
(cherry picked from commit 3cbdbc5564b6684d4737c61d4bcfccd516e14ce7)

external/vulkancts/modules/vulkan/dynamic_state/vktDynamicStateInheritanceTests.cpp

index 6c9b66c..d59702b 100644 (file)
@@ -759,7 +759,7 @@ void InheritanceTestInstance::startRenderCmds(const TestGeometry& geometry)
                        m_vk.cmdSetViewport(m_primaryCmdBuffer, 1, deUint32(geometry.viewports.size() - 1), &geometry.viewports[1]);
                        m_vk.cmdSetScissor(m_primaryCmdBuffer, 1, deUint32(geometry.scissors.size() - 1), &geometry.scissors[1]);
                }
-               /* FALLTHRU FALL-THROUGH */
+               /* FALLTHROUGH */
        case kInheritanceDisabled:
        case kInheritFromSecondary:
        case kInheritFromSecondaryWithCount: