From: Jarkko Pöyry Date: Thu, 26 Mar 2015 20:15:23 +0000 (-0700) Subject: Fix valgrind warnings in negative tests when running on null context. X-Git-Tag: upstream/0.1.0~1820^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=011ce17335ca4d080a4179639a4962bf078d4927;p=platform%2Fupstream%2FVK-GL-CTS.git Fix valgrind warnings in negative tests when running on null context. Change-Id: Ic58c2a34199be4436e59779c1cd78b8c49f8b037 --- diff --git a/modules/gles31/functional/es31fNegativeShaderApiTests.cpp b/modules/gles31/functional/es31fNegativeShaderApiTests.cpp index e0d5a6e..a35b941 100644 --- a/modules/gles31/functional/es31fNegativeShaderApiTests.cpp +++ b/modules/gles31/functional/es31fNegativeShaderApiTests.cpp @@ -555,8 +555,8 @@ void get_sampler_parameteriv (NegativeTestContext& ctx) void get_sampler_parameterfv (NegativeTestContext& ctx) { - float params; - GLuint sampler = 0; + float params = 0.0f; + GLuint sampler = 0; ctx.glGenSamplers (1, &sampler); ctx.beginSection("GL_INVALID_OPERATION is generated if sampler is not the name of a sampler object returned from a previous call to ctx.glGenSamplers."); diff --git a/modules/gles31/functional/es31fNegativeStateApiTests.cpp b/modules/gles31/functional/es31fNegativeStateApiTests.cpp index 53a42b9..8f07c11 100644 --- a/modules/gles31/functional/es31fNegativeStateApiTests.cpp +++ b/modules/gles31/functional/es31fNegativeStateApiTests.cpp @@ -335,10 +335,10 @@ void get_programiv (NegativeTestContext& ctx) void get_program_info_log (NegativeTestContext& ctx) { - GLuint program = ctx.glCreateProgram(); - GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); - GLsizei length[1]; - char infoLog[1]; + GLuint program = ctx.glCreateProgram(); + GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); + GLsizei length[1] = { 0 }; + char infoLog[1] = { 'x' }; ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); ctx.glGetProgramInfoLog (-1, 1, &length[0], &infoLog[0]);