Reviewed-by: Chris Forbes <[email protected]>
On Sun, Jan 19, 2014 at 6:13 PM, Vinson Lee <[email protected]> wrote: > Fixes "Dead assignment" bug reported by Clang Static Analyzer. > > Signed-off-by: Vinson Lee <[email protected]> > --- > tests/texturing/s3tc-errors.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/tests/texturing/s3tc-errors.c b/tests/texturing/s3tc-errors.c > index 5109697..710625c 100644 > --- a/tests/texturing/s3tc-errors.c > +++ b/tests/texturing/s3tc-errors.c > @@ -345,7 +345,7 @@ test_format(int width, int height, GLfloat *image, GLenum > format) > static bool > test_small_mipmap_level(void) > { > - bool pass; > + bool pass = true; > GLuint tex; > GLubyte buf[100]; > int width, height; > @@ -363,13 +363,13 @@ test_small_mipmap_level(void) > glTexImage2D(GL_TEXTURE_2D, 0, format, width, height, > 0, GL_RGBA, GL_UNSIGNED_BYTE, buf); > > - pass = piglit_check_gl_error(GL_NO_ERROR); > + pass = piglit_check_gl_error(GL_NO_ERROR) && pass; > > /* Try TexSubImage of whole texture */ > glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, width, height, > GL_RGBA, GL_UNSIGNED_BYTE, buf); > > - pass = piglit_check_gl_error(GL_NO_ERROR); > + pass = piglit_check_gl_error(GL_NO_ERROR) && pass; > } > } > > -- > 1.8.3.2 > > _______________________________________________ > Piglit mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/piglit _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
