OSDN Git Service

Fixing some warnings in libGLESv3.cpp
authorAlexis Hetu <sugoi@google.com>
Tue, 9 Jun 2015 18:28:06 +0000 (14:28 -0400)
committerAlexis Hétu <sugoi@google.com>
Tue, 9 Jun 2015 19:14:57 +0000 (19:14 +0000)
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 <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/OpenGL/libGLESv2/libGLESv3.cpp

index 379a60e..6a8947f 100644 (file)
@@ -402,7 +402,7 @@ static FormatMapStorage BuildFormatMapStorage2D()
        return map;\r
 }\r
 \r
-static bool GetStorageType(GLenum internalformat, GLenum type)\r
+static bool GetStorageType(GLenum internalformat, GLenum& type)\r
 {\r
        static const FormatMapStorage formatMap = BuildFormatMapStorage2D();\r
        FormatMapStorage::const_iterator iter = formatMap.find(internalformat);\r
@@ -2758,6 +2758,8 @@ GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex(GLuint program, const GLcha
 \r
                return programObject->getUniformBlockIndex(uniformBlockName);\r
        }\r
+\r
+       return GL_INVALID_INDEX;\r
 }\r
 \r
 GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)\r