Fix unintialized memory issues reported by valgrind

Change-Id: I2cdd303e0035d8e599fe5f4d9520f58c3058ccf4
diff --git a/framework/randomshaders/rsgExpression.cpp b/framework/randomshaders/rsgExpression.cpp
index bc3b6a5..b0184d9 100644
--- a/framework/randomshaders/rsgExpression.cpp
+++ b/framework/randomshaders/rsgExpression.cpp
@@ -523,6 +523,7 @@
 // According to GLSL ES spec.
 template <> inline bool		convert<float, bool>	(float src)	{ return src != 0.0f;					}
 template <> inline bool		convert<int, bool>		(int src)	{ return src != 0;						}
+template <> inline bool		convert<bool, bool>		(bool src)	{ return src;							}
 template <> inline float	convert<bool, float>	(bool src)	{ return src ? 1.0f : 0.0f;				}
 template <> inline int		convert<bool, int>		(bool src)	{ return src ? 1 : 0;					}
 
diff --git a/modules/gles31/functional/es31fNegativeStateApiTests.cpp b/modules/gles31/functional/es31fNegativeStateApiTests.cpp
index 1fe9b6b..cedbe0b 100644
--- a/modules/gles31/functional/es31fNegativeStateApiTests.cpp
+++ b/modules/gles31/functional/es31fNegativeStateApiTests.cpp
@@ -118,8 +118,8 @@
 
 void get_integeri_v (NegativeTestContext& ctx)
 {
-	GLint data = -1;
-	GLint maxUniformBufferBindings;
+	GLint data						= -1;
+	GLint maxUniformBufferBindings	= 0;
 
 	ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value.");
 	ctx.glGetIntegeri_v(-1, 0, &data);
@@ -136,8 +136,8 @@
 
 void get_integer64i_v (NegativeTestContext& ctx)
 {
-	GLint64 data = (GLint64)-1;;
-	GLint maxUniformBufferBindings;
+	GLint64 data					= (GLint64)-1;
+	GLint maxUniformBufferBindings	= 0;
 
 	ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value.");
 	ctx.glGetInteger64i_v(-1, 0, &data);
@@ -162,7 +162,7 @@
 
 void get_stringi (NegativeTestContext& ctx)
 {
-	GLint numExtensions;
+	GLint numExtensions	= 0;
 
 	ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value.");
 	ctx.glGetStringi(-1, 0);
@@ -180,10 +180,10 @@
 
 void get_attached_shaders (NegativeTestContext& ctx)
 {
-	GLuint shaders[1];
+	GLuint shaders[1]	= { 0 };
 	GLuint shaderObject = ctx.glCreateShader(GL_VERTEX_SHADER);
 	GLuint program		= ctx.glCreateProgram();
-	GLsizei count[1];
+	GLsizei count[1]	= { 0 };
 
 	ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
 	ctx.glGetAttachedShaders(-1, 1, &count[0], &shaders[0]);
@@ -283,10 +283,10 @@
 
 void get_shader_source (NegativeTestContext& ctx)
 {
-	GLsizei length[1];
-	char source[1];
-	GLuint program	= ctx.glCreateProgram();
-	GLuint shader	= ctx.glCreateShader(GL_VERTEX_SHADER);
+	GLsizei	length[1]	= { 0 };
+	char	source[1]	= { 0 };
+	GLuint	program		= ctx.glCreateProgram();
+	GLuint	shader		= ctx.glCreateShader(GL_VERTEX_SHADER);
 
 	ctx.beginSection("GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL.");
 	ctx.glGetShaderSource(-1, 1, &length[0], &source[0]);
@@ -311,9 +311,9 @@
 
 void get_programiv (NegativeTestContext& ctx)
 {
-	GLuint program	= ctx.glCreateProgram();
-	GLuint shader	= ctx.glCreateShader(GL_VERTEX_SHADER);
-	GLint params[1]	= { -1 };
+	GLuint	program		= ctx.glCreateProgram();
+	GLuint	shader		= ctx.glCreateShader(GL_VERTEX_SHADER);
+	GLint	params[1]	= { 0 };
 
 	ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value.");
 	ctx.glGetProgramiv(program, -1, &params[0]);
@@ -364,7 +364,7 @@
 
 void get_tex_parameterfv (NegativeTestContext& ctx)
 {
-	GLfloat params[1];
+	GLfloat params[1]	= { 0 };
 
 	ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value.");
 	ctx.glGetTexParameterfv (-1, GL_TEXTURE_MAG_FILTER, &params[0]);
@@ -378,7 +378,7 @@
 
 void get_tex_parameteriv (NegativeTestContext& ctx)
 {
-	GLint params[1];
+	GLint params[1]	= { 0 };
 
 	ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value.");
 	ctx.glGetTexParameteriv (-1, GL_TEXTURE_MAG_FILTER, &params[0]);
@@ -401,7 +401,7 @@
 
 	GLuint shader		= ctx.glCreateShader(GL_VERTEX_SHADER);
 	GLuint programEmpty = ctx.glCreateProgram();
-	GLfloat params[4];
+	GLfloat params[4]	= { 0.f };
 
 	ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
 	ctx.glGetUniformfv (-1, unif, &params[0]);
@@ -438,7 +438,7 @@
 
 	GLuint shader		= ctx.glCreateShader(GL_VERTEX_SHADER);
 	GLuint programEmpty = ctx.glCreateProgram();
-	GLint params[4];
+	GLint params[4]		= { 0 };
 
 	ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
 	ctx.glGetUniformiv (-1, unif, &params[0]);
@@ -475,7 +475,7 @@
 
 	GLuint shader		= ctx.glCreateShader(GL_VERTEX_SHADER);
 	GLuint programEmpty = ctx.glCreateProgram();
-	GLuint params[4];
+	GLuint params[4]	= { 0 };
 
 	ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
 	ctx.glGetUniformuiv (-1, unif, &params[0]);