Fixing some warnings in libGLESv3.cpp
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>
diff --git a/src/OpenGL/libGLESv2/libGLESv3.cpp b/src/OpenGL/libGLESv2/libGLESv3.cpp
index 379a60e..6a8947f 100644
--- a/src/OpenGL/libGLESv2/libGLESv3.cpp
+++ b/src/OpenGL/libGLESv2/libGLESv3.cpp
@@ -402,7 +402,7 @@
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 @@
return programObject->getUniformBlockIndex(uniformBlockName);
}
+
+ return GL_INVALID_INDEX;
}
GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params)