From f6fff71d8d4abef9fe7dc0d4dae05bc068b0dadc Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 5 Oct 2019 04:54:57 +0100 Subject: OPENGL: Add Missing Default Switch Cases These are flagged by GCC if -Wswitch-default is enabled. --- backends/graphics/opengl/context.cpp | 4 ++++ backends/graphics/opengl/debug.cpp | 2 ++ backends/graphics/opengl/framebuffer.cpp | 2 ++ 3 files changed, 8 insertions(+) (limited to 'backends') diff --git a/backends/graphics/opengl/context.cpp b/backends/graphics/opengl/context.cpp index a7f640d37e..08f44969a7 100644 --- a/backends/graphics/opengl/context.cpp +++ b/backends/graphics/opengl/context.cpp @@ -170,6 +170,10 @@ void OpenGLGraphicsManager::initializeGLContext() { case kContextGLES2: debug(5, "OpenGL: GLES2 context initialized"); break; + + default: + warning("OpenGL: Unknown context initialized"); + break; } // Log features supported by GL context. diff --git a/backends/graphics/opengl/debug.cpp b/backends/graphics/opengl/debug.cpp index c4319f5e36..05228cec34 100644 --- a/backends/graphics/opengl/debug.cpp +++ b/backends/graphics/opengl/debug.cpp @@ -45,6 +45,8 @@ Common::String getGLErrStr(GLenum error) { return "GL_STACK_UNDERFLOW"; case GL_OUT_OF_MEMORY: return "GL_OUT_OF_MEMORY"; + default: + break; } return Common::String::format("(Unknown GL error code 0x%X)", error); diff --git a/backends/graphics/opengl/framebuffer.cpp b/backends/graphics/opengl/framebuffer.cpp index 671c448d26..02c913c830 100644 --- a/backends/graphics/opengl/framebuffer.cpp +++ b/backends/graphics/opengl/framebuffer.cpp @@ -117,6 +117,8 @@ void Framebuffer::applyBlendState() { GL_CALL(glEnable(GL_BLEND)); GL_CALL(glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA)); break; + default: + break; } } -- cgit v1.2.3