Fix uninitialised variable warning for some compilers
authorSteve Hill <hills@broadcom.com>
Thu, 25 Oct 2018 09:36:50 +0000 (10:36 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 25 Oct 2018 19:14:22 +0000 (15:14 -0400)
Some compilers seem to get confused as to whether the scope
string-variable is initialised properly.

This change makes the switch that sets it up consistent with the
other switches and pacifies those compilers.

Components: Vulkan

Affects: dEQP-VK.memory_model.*

VK-GL-CTS issue: 1442

Change-Id: Id5ff742c85510af173020cf1bbfc16429a33f29f

external/vulkancts/modules/vulkan/memory_model/vktMemoryModelMessagePassing.cpp

index 3bc2738..fcae572 100644 (file)
@@ -233,6 +233,7 @@ void MemoryModelTestCase::initPrograms (SourceCollections& programCollection) co
        const char *scopeStr;
        switch (m_data.scope)
        {
+       default: DE_ASSERT(0); // fall through
        case SCOPE_DEVICE:              scopeStr = "gl_ScopeDevice"; break;
        case SCOPE_QUEUEFAMILY: scopeStr = "gl_ScopeQueueFamily"; break;
        case SCOPE_WORKGROUP:   scopeStr = "gl_ScopeWorkgroup"; break;