From f159eb552f8dae832fe9906b96a97cd8d9ee8833 Mon Sep 17 00:00:00 2001 From: Alexis Hetu Date: Tue, 9 Jun 2015 14:28:06 -0400 Subject: [PATCH] Fixing some warnings in libGLESv3.cpp MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit A missing & was causing an uninitialized parameter issue and a missing return in glGetUniformBlockIndex, in the case where the context is NULL, were causing warnings. Change-Id: Ifb40583c6d08d185d2e60f96066f1436398318ac Reviewed-on: https://swiftshader-review.googlesource.com/3436 Tested-by: Alexis Hétu Reviewed-by: Nicolas Capens --- src/OpenGL/libGLESv2/libGLESv3.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/OpenGL/libGLESv2/libGLESv3.cpp b/src/OpenGL/libGLESv2/libGLESv3.cpp index 379a60e85..6a8947f79 100644 --- a/src/OpenGL/libGLESv2/libGLESv3.cpp +++ b/src/OpenGL/libGLESv2/libGLESv3.cpp @@ -402,7 +402,7 @@ static FormatMapStorage BuildFormatMapStorage2D() return map; } -static bool GetStorageType(GLenum internalformat, GLenum type) +static bool GetStorageType(GLenum internalformat, GLenum& type) { static const FormatMapStorage formatMap = BuildFormatMapStorage2D(); FormatMapStorage::const_iterator iter = formatMap.find(internalformat); @@ -2758,6 +2758,8 @@ GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex(GLuint program, const GLcha return programObject->getUniformBlockIndex(uniformBlockName); } + + return GL_INVALID_INDEX; } GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params) -- 2.11.0