On 01/15/2013 12:15 AM, Vinson Lee wrote:
Fixes unchecked return value defect reported by Coverity.
Signed-off-by: Vinson Lee<[email protected]>
---
tests/shaders/glsl-mat-attribute.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/shaders/glsl-mat-attribute.c
b/tests/shaders/glsl-mat-attribute.c
index adad0ed..942c599 100644
--- a/tests/shaders/glsl-mat-attribute.c
+++ b/tests/shaders/glsl-mat-attribute.c
@@ -212,6 +212,7 @@ void piglit_init(int argc, char **argv)
const char *sources[2];
GLint stat;
GLuint sh;
+ GLboolean ok;
sprintf(buf, "#define IDX %d\n", i);
@@ -238,7 +239,9 @@ void piglit_init(int argc, char **argv)
glBindAttribLocation(prog[i], 5, "normalization");
glLinkProgram(prog[i]);
- piglit_link_check_status(prog[i]);
+ ok = piglit_link_check_status(prog[i]);
+ if (!ok)
+ piglit_report_result(PIGLIT_FAIL);
}
glClearColor(0.3, 0.3, 0.3, 0.0);
It looks like there's a few other instances of not checking that
return value in some other tests too.
tests/shaders/attribute0b.c: piglit_link_check_status(prog);
tests/shaders/attribute0.c: piglit_link_check_status(prog);
tests/shaders/glsl-fs-color-matrix.c: piglit_link_check_status(prog);
Reviewed-by: Brian Paul <[email protected]>
_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit