Fixed harmless uninitialized variables warnings

No more 'variable  is used uninitialized whenever switch default is taken' warnings reported by GCC/Clang
This commit is contained in:
alexey.lysiuk 2017-01-05 15:47:16 +02:00 committed by Christoph Oelckers
parent 9ed2da176e
commit d77718d422

View file

@ -482,7 +482,7 @@ GLuint FGLRenderBuffers::Create2DTexture(const FString &name, GLuint format, int
glBindTexture(GL_TEXTURE_2D, handle); glBindTexture(GL_TEXTURE_2D, handle);
FGLDebug::LabelObject(GL_TEXTURE, handle, name); FGLDebug::LabelObject(GL_TEXTURE, handle, name);
GLenum dataformat, datatype; GLenum dataformat = 0, datatype = 0;
switch (format) switch (format)
{ {
case GL_RGBA8: dataformat = GL_RGBA; datatype = GL_UNSIGNED_BYTE; break; case GL_RGBA8: dataformat = GL_RGBA; datatype = GL_UNSIGNED_BYTE; break;