[Piglit] [PATCH] glsl-mat-attribute: Use result of link status check.
Vinson Lee
vlee at freedesktop.org
Mon Jan 14 23:15:23 PST 2013
Fixes unchecked return value defect reported by Coverity.
Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
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);
--
1.8.1
More information about the Piglit
mailing list