diff options
author | Eric Anholt <eric@anholt.net> | 2011-07-13 09:46:59 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2011-07-25 16:11:11 -0700 |
commit | 2d707bffcd46dccfece09736becff8765d42909a (patch) | |
tree | 94849d2b835c49e69616da25d71306b68a367e72 /tests | |
parent | 9f160a7dbef7a538591ed5aac296a045f916c2a3 (diff) |
Fix several "set-but-not-used" gcc warnings.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/general/framebuffer-srgb.c | 3 | ||||
-rw-r--r-- | tests/shaders/glsl-fs-color-matrix.c | 9 | ||||
-rw-r--r-- | tests/shaders/glsl-fs-discard-02.c | 2 | ||||
-rw-r--r-- | tests/spec/arb_es2_compatibility/arb_es2_compatibility-drawbuffers.c | 2 |
4 files changed, 11 insertions, 5 deletions
diff --git a/tests/general/framebuffer-srgb.c b/tests/general/framebuffer-srgb.c index 87590656..a7226dcc 100644 --- a/tests/general/framebuffer-srgb.c +++ b/tests/general/framebuffer-srgb.c @@ -47,7 +47,6 @@ framebuffer_srgb_api_no_ext(void) GLboolean pass = GL_TRUE; GLboolean boolmode = GL_FALSE; GLenum ret; - GLboolean is_enabled; glGetBooleanv(GL_FRAMEBUFFER_SRGB_CAPABLE_EXT, &boolmode); ret = glGetError(); @@ -56,7 +55,7 @@ framebuffer_srgb_api_no_ext(void) pass = GL_FALSE; } - is_enabled = glIsEnabled(GL_FRAMEBUFFER_SRGB_EXT); + (void)glIsEnabled(GL_FRAMEBUFFER_SRGB_EXT); ret = glGetError(); if (ret != GL_INVALID_ENUM) { printf("no invalid enum on glIsEnabled(GL_FRAMEBUFFER_SRGB_EXT)\n"); diff --git a/tests/shaders/glsl-fs-color-matrix.c b/tests/shaders/glsl-fs-color-matrix.c index 8fa57a41..6c70c758 100644 --- a/tests/shaders/glsl-fs-color-matrix.c +++ b/tests/shaders/glsl-fs-color-matrix.c @@ -88,6 +88,10 @@ enum piglit_result piglit_display(void) { GLboolean pass = GL_TRUE; + GLuint tex; + + tex = piglit_rgbw_texture(GL_RGBA8, 64, 64, GL_FALSE, GL_TRUE, + GL_UNSIGNED_NORMALIZED); glClear(GL_COLOR_BUFFER_BIT); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); @@ -110,6 +114,8 @@ piglit_display(void) glutSwapBuffers(); + glDeleteTextures(1, &tex); + return pass ? PIGLIT_PASS : PIGLIT_FAIL; } @@ -119,7 +125,6 @@ piglit_init(int argc, char **argv) GLuint vs; GLuint fs; GLint loc; - GLint tex; piglit_require_GLSL(); @@ -150,6 +155,4 @@ piglit_init(int argc, char **argv) piglit_EnableVertexAttribArray(0); piglit_EnableVertexAttribArray(1); - - tex = piglit_rgbw_texture(GL_RGBA8, 64, 64, GL_FALSE, GL_TRUE, GL_UNSIGNED_NORMALIZED); } diff --git a/tests/shaders/glsl-fs-discard-02.c b/tests/shaders/glsl-fs-discard-02.c index 8b51792b..54b77aa0 100644 --- a/tests/shaders/glsl-fs-discard-02.c +++ b/tests/shaders/glsl-fs-discard-02.c @@ -94,6 +94,8 @@ static GLboolean test() pass = pass && piglit_probe_rect_rgba(0, 0, piglit_width, piglit_height, green); + piglit_DeleteProgram(prog); + return pass; } diff --git a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-drawbuffers.c b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-drawbuffers.c index 6c66fd52..378d0dc7 100644 --- a/tests/spec/arb_es2_compatibility/arb_es2_compatibility-drawbuffers.c +++ b/tests/spec/arb_es2_compatibility/arb_es2_compatibility-drawbuffers.c @@ -102,5 +102,7 @@ piglit_init(int argc, char **argv) assert(glGetError() == 0); + glDeleteTextures(1, &tex0); + piglit_report_result(PIGLIT_PASS); } |